The value in openCryptModule() is the block size, it's not the key size. AES requires a 128-bit block size, the key size is another thing.