1 | <?php |
||
27 | class AesCtr extends Aes |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * AES-256 cipher identifier that will be passed to openssl |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | const CIPHER = 'aes-256-ctr'; |
||
36 | |||
37 | /** |
||
38 | * Decrypt cyphertext |
||
39 | * |
||
40 | * @param string $cyphertext Cyphertext to decrypt |
||
41 | * @param string $password Password that should be used to decrypt input data |
||
42 | * @param int $cost Number of HMAC iterations to perform on key |
||
43 | * |
||
44 | * @return string|boolean Returns false on checksum validation failure |
||
45 | */ |
||
46 | public static function decrypt($cyphertext, $password, $cost = 0) |
||
50 | |||
51 | /** |
||
52 | * Encrypt plaintext |
||
53 | * |
||
54 | * @param string $plaintext Plaintext string to encrypt. |
||
55 | * @param string $password Password used to encrypt data. |
||
56 | * @param int $cost Number of HMAC iterations to perform on key |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public static function encrypt($plaintext, $password, $cost = 0) |
||
64 | |||
65 | } |
||
66 |