Added equivalent test to cipher.c, also fixed a bug in cryptodev.py