usersystem: Refactor encryption