Example #1
0
        public int EncryptMessage(ref MSI.IBufferOffsetSize incoming)
        {
            var buffer = new MSI.TlsBuffer(BOSWrapper.Wrap(incoming));
            var retval = Context.EncryptMessage(ref buffer);

            incoming = BOSWrapper.Wrap(buffer.GetRemaining());
            return((int)retval);
        }
Example #2
0
        public int GenerateNextToken(MSI.IBufferOffsetSize incoming, out MSI.IBufferOffsetSize outgoing)
        {
            var input  = incoming != null ? new MSI.TlsBuffer(BOSWrapper.Wrap(incoming)) : null;
            var output = new MSI.TlsMultiBuffer();
            var retval = Context.GenerateNextToken(input, output);

            if (output.IsEmpty)
            {
                outgoing = null;
            }
            outgoing = BOSWrapper.Wrap(output.StealBuffer());
            return((int)retval);
        }
Example #3
0
 public static BOSWrapper Wrap(MSI.IBufferOffsetSize bos)
 {
     return(bos != null ? new BOSWrapper(bos.Buffer, bos.Offset, bos.Size) : null);
 }