Exemplo n.º 1
0
        public IActionResult RegisterAccount(Student student)
        {
            var salt = _dbService.CreateSalt();

            var hash = _dbService.CreateHash(student.password, salt);


            if (!_dbService.TryHash(student, salt, hash).GetType().Equals("BadRequestObjectResult"))
            {
                return(Ok());
            }

            return(Unauthorized());
        }