コード例 #1
0
ファイル: Parsing.cs プロジェクト: KasperSK/I4IKN
 public override int GetEncryptedMessage(EncryptStm context, out byte[] buffer)
 {
     context.AddByte(context.FrameChar);
     buffer = context.Buffer;
     context.SetState(new Idle());
     return context.BufferSize;
 }
コード例 #2
0
ファイル: Parsing.cs プロジェクト: KasperSK/I4IKN
 public override void ParseByte(EncryptStm context, byte b)
 {
     if (b == context.FrameChar)
     {
         context.AddByte(context.FrameEscape);
         context.AddByte(context.FrameSub1);
     } else if (b == context.FrameEscape)
     {
         context.AddByte(context.FrameEscape);
         context.AddByte(context.FrameSub2);
     }
     else
     {
         context.AddByte(b);
     }
 }