Hi All,
I have a serious issue with Roxen5/Pike7.8: there seems to be no block_crypt anymore of AES:
Crypto.AES cr = Crypto.AES(); cr->set_decrypt_key(enc_key); decrypted = cr->crypt_block(String.hex2string(in)) - "\0";
Throws an exception with Pike7.8/Roxen5
Where can I find any 7.8 documentation by the way?
You can use
Crypto.CBC cbc = Crypto.CBC(cr); cbc->set_decrypt_key(x); cbc->decrypt(in);
That will give you CBC mode, but if your data is only one block that shouldn't matter, I suppose.
Use #pike 7.4 or update your code to the newer Crypto api. The compat wrappers for Crypto.AES as found in lib/7.4/modules/Crypto.pmod/aes.pike:
string name() { return "AES"; }
int query_key_length() { return 32; } int query_block_size() { return block_size(); } string crypt_block(string p) { return crypt(p); }
pike-devel@lists.lysator.liu.se