CSharpRTMP.Core.Protocols.Rtmfp.AESEngine.Process C# (CSharp) Method

Process() public method

public Process ( System.Stream outStream ) : void
outStream System.Stream
return void
        public void Process(Stream outStream)
        {
            if (Type == AESType.EMPTY) return;
            if (Type == AESType.SYMMETRIC)
            {
                if (_direction == Direction.DECRYPT)
                {
                    s_aesDecrypt.Process(outStream);
                }
                else
                {
                    s_aesEncrypt.Process(outStream);
                }
                return;
            }
            
            if (_direction == Direction.ENCRYPT)
            {
                Encrypt(new BufferWithOffset(outStream));
            }
            else
            {
                Decrypt(new BufferWithOffset(outStream));
            }
            if (_canRecycle)this.ReturnPool();
        }
    }

Usage Example

コード例 #1
0
        public void Process(Stream outStream)
        {
            if (Type == AESType.EMPTY)
            {
                return;
            }
            if (Type == AESType.SYMMETRIC)
            {
                if (_direction == Direction.DECRYPT)
                {
                    s_aesDecrypt.Process(outStream);
                }
                else
                {
                    s_aesEncrypt.Process(outStream);
                }
                return;
            }

            if (_direction == Direction.ENCRYPT)
            {
                Encrypt(new BufferWithOffset(outStream));
            }
            else
            {
                Decrypt(new BufferWithOffset(outStream));
            }
            if (_canRecycle)
            {
                this.ReturnPool();
            }
        }
All Usage Examples Of CSharpRTMP.Core.Protocols.Rtmfp.AESEngine::Process