public void HashWithSaltPassword_ShouldReturnSaltWithHashString() { var saltAndHash = _passwordHashService.HashWithSaltPassword(Password); var splited = saltAndHash.Split(Delimiter); Assert.Equal(2, splited.Length); }
public async Task HandleCreateRequest(ClientRequest request) { var clientSecret = _passwordHashService.HashWithSaltPassword(request.ClientSecret); var entity = _mapper.RequestToEntity(request, clientSecret); await _clientRespository.Create(entity); }
private async Task <Website> GetEntity(WebsiteRequest request, string path = null) { var filePath = await _fileService.UploadImage(request.HomepageSnapshot, path); var password = _passwordHashService.HashWithSaltPassword(request.Login.Password); var entity = _mapper.RequestToEntity(request, filePath, password); return(entity); }