コード例 #1
0
 public static Password CreateFromRawPassword(string rawPassword)
 {
     return(new Password(StringEncryptor.Encrypt(rawPassword)));
 }
コード例 #2
0
 public string GetRawPassword()
 {
     return(EncryptPassword ? StringEncryptor.Decrypt(_password) : _password);
 }
コード例 #3
0
 public Password(string password, bool isEncrypted, bool encrypt)
 {
     EncryptPassword = encrypt;
     _password       = EncryptPassword && !isEncrypted?StringEncryptor.Encrypt(password) : password;
 }