aes encryption with bug in generate words func