/// <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 RCX(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 RCX(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 RCX(pass); return(rcx.Encrypt(rcx.Encrypt(rcx.Encrypt(data), OrderType.Desc))); }
public ThreeRCX(string pass, Encoding encoding) { rcx = new RCX(pass, encoding); }
public ThreeRCX(string pass) { rcx = new RCX(pass); }