Refactor krytpo to suppport encrypt()