public string Decrypt(string value) { string result = null; try { result = _cryptography.Decrypt(value); } catch (Exception) { //Swallow encrytion errors. //TODO: Logging here. } return(result); }
public async Task <UserDTO> Login(string email, string password) { var user = await _userRepository.FindLogin(email, password); user.ChangePassword(_rijndaelCryptography.Decrypt(user.Password)); return(_mapper.Map <UserDTO>(user)); }
public IActionResult Decrypt([FromBody] string text) { try { return(Ok(_rijndaelCryptography.Decrypt(text))); } catch (Exception e) { return(StatusCode(500, new { message = e.Message })); } }
public string Decrypt(string text) { try { return(_rijndaelCryptography.Decrypt(text)); } catch (Exception ex) { throw; //Create a CryptographyException } }