I've made a slight reorganization of cipher.cmod:
: Use a custom struct pike_cipher to keep track of information about : ciphers, instead of Nettle's primitive struct nettle_cipher. : : The only significant difference is that the pike version uses : set_key-functions that deal with invalid or weak keys, and throws pike : errors. : : The check_key_size method is gone, but that's the only user-visible : change. To test if a key is valid, just try to use it, and catch the : error.
It passes the testsuite, but I haven't done any testing beyond that.