Added encrypt bytearray and reworked its function.