Prototype code for encryption