Added buffer encrypt/decrypt