fix the function createCipher()