Lines Matching refs:key
11 /* Prototype : string mcrypt_encrypt(string cipher, string key, string data, string mode, string i…
12 * Description: OFB crypt/decrypt data using key key with cipher cipher starting with iv
16 …/* Prototype : string mcrypt_decrypt(string cipher, string key, string data, string mode, string …
17 * Description: OFB crypt/decrypt data using key key with cipher cipher starting with iv
21 /* Prototype : string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)
22 * Description: CBC crypt/decrypt data using key key with cipher cipher starting with iv
51 echo "\n--- testing different key lengths\n";
52 foreach ($keys as $key) {
53 echo "\nkey length=".strlen($key)."\n";
54 $res = mcrypt_encrypt($cipher, $key, $data, MCRYPT_MODE_CBC, $iv);
56 $res = mcrypt_cbc($cipher, $key, $res, MCRYPT_DECRYPT, $iv);
60 $key = b'1234567890123456';
64 $res = mcrypt_cbc($cipher, $key, $data, $mode, $iv);
66 $res = mcrypt_decrypt($cipher, $key, $res, MCRYPT_MODE_CBC, $iv);
75 --- testing different key lengths
77 key length=0
83 key length=0
89 key length=8
95 key length=16