encrypt and decrypt method note update