/// <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))); } }
/// <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)); } }