Encrypt and decrypt methods