public static Password FromPlainText(string plainText, string secret) { RsEncryptor encryptor = new RsEncryptor(secret); Password password = new Password(); password.Data = encryptor.Encrypt(plainText); return(password); }
public string GetDecrypted(string secret) { RsEncryptor encryptor = new RsEncryptor(secret); return encryptor.Decrypt(Data); }
public void SetEncrypted(string plainText, string secret) { RsEncryptor encryptor = new RsEncryptor(secret); Data = encryptor.Encrypt(plainText); }