Fix typo of function encrypt'
Moved split, added helper functions.
Implemented encrypt.
Remake of encrypt.