Repaired implementation of prepare() function in HuffmanEncryption.