class Rijndael256Cipher extends McryptCipher

Crypt cipher for Rijndael 256 encryption, decryption and key generation.

Methods

__construct()

Constructor.

string
decrypt( string $data, Key $key)

Method to decrypt a data string.

string
encrypt( string $data, Key $key)

Method to encrypt a data string.

Key
generateKey( array $options = array())

Method to generate a new encryption key object.

string
pbkdf2( string $p, string $s, integer $kl, integer $c = 10000, string $a = 'sha256')

PBKDF2 Implementation for deriving keys.

Details

__construct()

Constructor.

Exceptions

RuntimeException

string decrypt( string $data, Key $key)

Method to decrypt a data string.

Parameters

string $data The encrypted string to decrypt.
Key $key The key[/pair] object to use for decryption.

Return Value

string The decrypted data string.

Exceptions

InvalidArgumentException

string encrypt( string $data, Key $key)

Method to encrypt a data string.

Parameters

string $data The data string to encrypt.
Key $key The key[/pair] object to use for encryption.

Return Value

string The encrypted data string.

Exceptions

InvalidArgumentException

Key generateKey( array $options = array())

Method to generate a new encryption key object.

Parameters

array $options Key generation options.

Return Value

Key

Exceptions

InvalidArgumentException

string pbkdf2( string $p, string $s, integer $kl, integer $c = 10000, string $a = 'sha256')

PBKDF2 Implementation for deriving keys.

Parameters

string $p Password
string $s Salt
integer $kl Key length
integer $c Iteration count
string $a Hash algorithm

Return Value

string The derived key.