Sample code for client-side encryption