Example code for android hashing and encryption