Crypt_AES Crypt_AES(
[optional
$mode = CRYPT_AES_MODE_CBC])
|
|
Default Constructor.
Determines whether or not the mcrypt extension should be used. $mode should only, at present, be CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC. If not explictly set, CRYPT_AES_MODE_CBC will be used.
Tags:
Parameters:
void encrypt(
String
$plaintext)
|
|
Encrypts a message.
$plaintext will be padded with up to 16 additional bytes. Other AES implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:
http://www.di-mgt.com.au/cryptopad.html
An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of 16, however, arbitrary values can be added to make it that length.
Tags:
Overrides
Crypt_Rijndael::encrypt() (Encrypts a message.)
Parameters:
void setBlockLength(
Integer
$length)
|
|
Dummy function
Since Crypt_AES extends Crypt_Rijndael, this function is, technically, available, but it doesn't do anything.
Tags:
Overrides
Crypt_Rijndael::setBlockLength() (Sets the block length)
Parameters: