예제 #1
0
        public static int UnsealMessage(
            SSPIInterface SecModule,
            ref long context,
            int QOP,
            SecurityBufferClass[] input,
            int sequenceNumber)
        {
            GCHandle[] handleIn = PinBuffers(input);
            SecurityBufferDescriptor sdcInOut = new SecurityBufferDescriptor(input);
            int errorCode = SecModule.UnsealMessage(ref context, ref sdcInOut, QOP, sequenceNumber);

            SecurityBufferClass[] result = sdcInOut.marshall();

            for (int k = 0; k < input.Length; k++)
            {
                input[k] = result[k];
            }
            sdcInOut.FreeAllBuffers(0);
            FreeGCHandles(handleIn);
            return(errorCode);
        }