コード例 #1
0
 /// <summary>
 /// RTMPE type 9 uses Blowfish on the regular signature ("http://en.wikipedia.org/wiki/Blowfish_(cipher)")
 /// </summary>
 public static void rtmpe9_sig(byte[] array, int offset, int keyid)
 {
     Org.BouncyCastle.Crypto.Engines.BlowfishEngine bf = new Org.BouncyCastle.Crypto.Engines.BlowfishEngine();
     bf.LittleEndian = true;
     bf.Init(true, new Org.BouncyCastle.Crypto.Parameters.KeyParameter(RTMPConst.rtmpe9_keys[keyid]));
     byte[] output = new byte[8];
     bf.ProcessBlock(array, offset, output, 0);
     Array.Copy(output, 0, array, offset, 8);
 }
コード例 #2
0
ファイル: RTMP.cs プロジェクト: pilehave/headweb-mp
 /// <summary>
 /// RTMPE type 9 uses Blowfish on the regular signature ("http://en.wikipedia.org/wiki/Blowfish_(cipher)")
 /// </summary>
 static void rtmpe9_sig(byte[] array, int offset, int keyid)
 {
     Org.BouncyCastle.Crypto.Engines.BlowfishEngine bf = new Org.BouncyCastle.Crypto.Engines.BlowfishEngine();
     bf.LittleEndian = true;
     bf.Init(true, new Org.BouncyCastle.Crypto.Parameters.KeyParameter(rtmpe9_keys[keyid]));
     byte[] output = new byte[8];
     bf.ProcessBlock(array, offset, output, 0);
     Array.Copy(output, 0, array, offset, 8);
 }