public string Encrypt(string encryptStr) { _original = encryptStr; string cbcEncrypted = _baseCbc.Encrypt(encryptStr); _pcbcEncrypted = XOR.Gate(_original, cbcEncrypted); return(_pcbcEncrypted); }
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)); } }