Add encrypt, decrypt function