Exemplo n.º 1
0
        public static Password FromPlainText(string plainText, string secret)
        {
            RsEncryptor encryptor = new RsEncryptor(secret);
            Password    password  = new Password();

            password.Data = encryptor.Encrypt(plainText);
            return(password);
        }
Exemplo n.º 2
0
 public string GetDecrypted(string secret)
 {
     RsEncryptor encryptor = new RsEncryptor(secret);
     return encryptor.Decrypt(Data);
 }
Exemplo n.º 3
0
 public void SetEncrypted(string plainText, string secret)
 {
     RsEncryptor encryptor = new RsEncryptor(secret);
     Data = encryptor.Encrypt(plainText);
 }