PHP Class Dcrypt\Aes

Inheritance: extends Cryptobase
ファイルを表示 Open project: dopecode/dcrypt Class Usage Examples

Public Methods

Method Description
decrypt ( string $cyphertext, string $password, integer $cost ) : string Decrypt cyphertext
encrypt ( string $plaintext, string $password, integer $cost ) : string Encrypt plaintext

Protected Methods

Method Description
mode ( ) : string Return the encryption mode string. "cbc" or "ctr"

Method Details

decrypt() public static method

Decrypt cyphertext
public static decrypt ( string $cyphertext, string $password, integer $cost ) : string
$cyphertext string Cyphertext to decrypt
$password string Password that should be used to decrypt input data
$cost integer Number of HMAC iterations to perform on key
return string

encrypt() public static method

Encrypt plaintext
public static encrypt ( string $plaintext, string $password, integer $cost ) : string
$plaintext string Plaintext string to encrypt.
$password string Password used to encrypt data.
$cost integer Number of HMAC iterations to perform on key
return string

mode() protected static method

Return the encryption mode string. "cbc" or "ctr"
protected static mode ( ) : string
return string