implemented readBytes
started PalaceEncryption.js