Pike v7.6 release 117 running Hilfe v3.5 (Incremental Pike Frontend)
Crypto.DES3()->set_encrypt_key("\x01\x23\x45\x67\x89\xab\xcd\xef"+"\x01"*8);
DES3_INFO: Key is weak. src/post_modules/Nettle/cipher.cmod:785: Nettle.DES3_State()->set_encrypt_key("\1#Eg\211«Íï\1\1\1\1\1\1\1\1") HilfeInput:1: HilfeInput()->___HilfeWrapper()
Well, never you mind! I need to use this particular key for testing, and don't care that it's weak (it's just a test key anyway).
The autodoc says
/*! @decl CipherState set_encrypt_key(string key, void|int force)
but that doesn't seem to work either:
Crypto.DES3()->set_encrypt_key("\x01\x23\x45\x67\x89\xab\xcd\xef"+"\x01"*8, 1);
Compiler Error: 1:Too many arguments to set_encrypt_key. Compiler Error: 1:Expected: function(string : { this_program = object(implements 65740) }) Compiler Error: 1:Got : function(string, int(1..1) : void | mixed)
What gives?
Ah. lib/modules/Crypto.pmod/module.pmod:
class CipherState { inherit Nettle.CipherState; this_program set_encrypt_key(string); // Better return type this_program set_decrypt_key(string); // Better return type }
Uh, yes, but worse argument type... *fixing*
pike-devel@lists.lysator.liu.se