Finished up encryption functions.