Finished encrypt function

Next need to clean up and rewrite decrypt function