Added an encryption example. Also aligned functions to an order that makes sense.