add encrypt, decrypt snippet