コード例 #1
0
        /// <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)));
        }
コード例 #2
0
        /// <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)));
        }
コード例 #3
0
        /// <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)));
        }
コード例 #4
0
 public ThreeRCY(string pass, Encoding encoding)
 {
     rcy = new RCY(pass, encoding);
 }
コード例 #5
0
 public ThreeRCY(string pass)
 {
     rcy = new RCY(pass);
 }