Exemplo n.º 1
0
 private Stream CreateStream(Stream sInput, bool bEncrypt, byte[] pbKey, byte[] pbIV)
 {
     ICryptoTransform iTransform = new CFBTransform(pbKey, pbIV, bEncrypt, _cipher);
     return new CryptoStream(sInput, iTransform, bEncrypt ? CryptoStreamMode.Write : CryptoStreamMode.Read);
 }
Exemplo n.º 2
0
        private Stream CreateStream(Stream sInput, bool bEncrypt, byte[] pbKey, byte[] pbIV)
        {
            ICryptoTransform iTransform = new CFBTransform(pbKey, pbIV, bEncrypt, _cipher);

            return(new CryptoStream(sInput, iTransform, bEncrypt ? CryptoStreamMode.Write : CryptoStreamMode.Read));
        }