Ejemplo n.º 1
0
 /// <summary>
 /// Converts plain text to ciphered text using a plain text password
 /// </summary>
 /// <param name="value"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static string Encrypt(string value, string password)
 {
     using (var cipher = new RubykCipher())
     {
         return(cipher.Encrypt(value, GetKey(password)));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Converts plain text to ciphered text using an encoded key
 /// </summary>
 /// <param name="value"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 public static string Encrypt(string value, byte[] key)
 {
     using (var cipher = new RubykCipher())
     {
         return(cipher.Encrypt(value, key));
     }
 }