コード例 #1
0
        public string Encrypt(string encryptStr)
        {
            _original = encryptStr;
            string cbcEncrypted = _baseCbc.Encrypt(encryptStr);

            _pcbcEncrypted = XOR.Gate(_original, cbcEncrypted);

            return(_pcbcEncrypted);
        }
コード例 #2
0
 public string Decrypt(string decryptStr)
 {
     if (string.IsNullOrEmpty(_original))
     {
         throw new System.NullReferenceException("can't found the original value..");
     }
     else
     {
         string pcbcDecrypted = XOR.Gate(_original, _pcbcEncrypted);
         return(_baseCbc.Decrypt(pcbcDecrypted));
     }
 }