/// <summary> /// Encrypt /// </summary> /// <param name="data"></param> /// <param name="pass"></param> /// <returns></returns> public static byte[] Encrypt(string data, string pass) { if (string.IsNullOrEmpty(data)) { throw new ArgumentNullException("data"); } if (string.IsNullOrEmpty(pass)) { throw new ArgumentNullException("pass"); } var rcx = new RCY(pass); return(rcx.Encrypt(rcx.Encrypt(rcx.Encrypt(data), OrderType.Desc))); }
/// <summary> /// Encrypt /// </summary> /// <param name="data"></param> /// <param name="pass"></param> /// <param name="encoding"></param> /// <returns></returns> public static byte[] Encrypt(string data, byte[] pass, Encoding encoding) { if (string.IsNullOrEmpty(data)) { throw new ArgumentNullException("data"); } if (pass == null) { throw new ArgumentNullException("pass"); } if (pass.Length == 0) { throw new ArgumentNullException("pass"); } var rcx = new RCY(pass, encoding); return(rcx.Encrypt(rcx.Encrypt(rcx.Encrypt(data), OrderType.Desc))); }
/// <summary> /// Encrypt /// </summary> /// <param name="data"></param> /// <param name="pass"></param> /// <returns></returns> public static byte[] Encrypt(byte[] data, byte[] pass) { if (data == null) { throw new ArgumentNullException("data"); } if (data.Length == 0) { throw new ArgumentNullException("data"); } if (pass == null) { throw new ArgumentNullException("pass"); } if (pass.Length == 0) { throw new ArgumentNullException("pass"); } var rcx = new RCY(pass); return(rcx.Encrypt(rcx.Encrypt(rcx.Encrypt(data), OrderType.Desc))); }
public ThreeRCY(string pass, Encoding encoding) { rcy = new RCY(pass, encoding); }
public ThreeRCY(string pass) { rcy = new RCY(pass); }