fixed initEncryption