Public Method Details |
Crypt_HCEMD5 |
public void Crypt_HCEMD5( string $key, [ string $rand ] )
|
|
Creates a Crypt_HCEMD5 object.
|
Parameter |
|
string |
$key |
|
|
shared secret key |
|
|
string |
$rand |
= >>null<< |
|
(optional) The randomly generated key |
|
Returns |
void |
|
encrypt |
public string encrypt( string $data )
|
|
Encrypt a block of data.
|
Parameter |
|
string |
$data |
|
|
data to encrypt. |
|
Returns |
string The encrypted binary data. |
|
decrypt |
public string decrypt( string $data )
|
|
Decrypt a block of data.
|
Parameter |
|
string |
$data |
|
|
data to decrypt. |
|
Returns |
string The decrypted binary data. |
|
encodeMime |
public string encodeMime( string $data )
|
|
Encrypt a block of data after MIME-encoding it.
|
Parameter |
|
string |
$data |
|
|
data to encrypt. |
|
Returns |
string The encrypted mime-encoded data. |
|
decodeMime |
public string decodeMime( string $data )
|
|
Decrypt a block of data and then MIME-decode it.
|
Parameter |
|
string |
$data |
|
|
data to decrypt. |
|
Returns |
string The decrypted mime-decoded data. |
|
encodeMimeSelfRand |
public void encodeMimeSelfRand( string $data )
|
|
Encrypt a block of data after MIME-encoding it, and include the
random hash in the final output in plaintext so it can beretrieved and decrypted with only the secret key bydecodeMimeSelfRand().
|
Parameter |
|
string |
$data |
|
|
data to encrypt. |
|
Returns |
void |
|
decodeMimeSelfRand |
public string decodeMimeSelfRand( string $data )
|
|
Decrypt a block of data and then MIME-decode it, using the
random key stored in beginning of the ciphertext generated byencodeMimeSelfRand().
|
Parameter |
|
string |
$data |
|
|
data to decrypt, in the format: randkey#encrypted_data. |
|
Returns |
string The decrypted, mime-decoded data. |
|