public IActionResult Get() { string salt = HashManager.CreateSalt(); string hash = HashManager.CreateHash("123123", salt); return(Ok(new { salt = salt, hash = hash })); }
public override void Save(Usuario entity) { string salt = HashManager.CreateSalt(); string hashPassword = HashManager.CreateHash(entity.Password, salt); entity.Salt = salt; entity.Password = hashPassword; base.Save(entity); }