Implemented encrypt().