public Session() { Writer = new RtmfpWriter(_outputBuffer) { BufferSize = RtmfpUtils.RTMFP_MAX_PACKET_LENGTH }; AesEncrypt = new AESEngine(Defines.RTMFP_SYMETRIC_KEY, AESEngine.Direction.ENCRYPT); AesDecrypt = new AESEngine(Defines.RTMFP_SYMETRIC_KEY); }
public Session(Peer peer, byte[] decryptKey, byte[] encryptKey) { Writer = new RtmfpWriter(_outputBuffer) { BufferSize = RtmfpUtils.RTMFP_MAX_PACKET_LENGTH }; AesEncrypt = new AESEngine(encryptKey, AESEngine.Direction.ENCRYPT); AesDecrypt = new AESEngine(decryptKey); Peer = peer.Clone(); Peer.Addresses[0] = peer.Address; }