internal static void DecryptMessage(
            SecHandle context,
            IEnumerable <SecurityBuffer> messages,
            byte[] signature,
            int sequence_no)
        {
            if (context is null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (messages is null)
            {
                throw new ArgumentNullException(nameof(messages));
            }

            if (signature is null)
            {
                throw new ArgumentNullException(nameof(signature));
            }

            List <SecurityBuffer> sig_buffers = new List <SecurityBuffer>(messages);

            sig_buffers.Add(new SecurityBufferInOut(SecurityBufferType.Token | SecurityBufferType.ReadOnly, signature));

            using (var list = new DisposableList())
            {
                var buffers = sig_buffers.ToBufferList(list);
                var desc    = buffers.ToDesc(list);
                SecurityNativeMethods.DecryptMessage(context, desc, sequence_no, out _).CheckResult();
                sig_buffers.UpdateBuffers(desc);
            }
        }
        internal static void DecryptMessageNoSignature(
            SecHandle context,
            IEnumerable <SecurityBuffer> messages,
            int sequence_no)
        {
            if (context is null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (messages is null)
            {
                throw new ArgumentNullException(nameof(messages));
            }

            using (var list = new DisposableList())
            {
                var buffers = messages.ToBufferList(list);
                var desc    = buffers.ToDesc(list);
                SecurityNativeMethods.DecryptMessage(context, desc, sequence_no, out _).CheckResult();
                messages.UpdateBuffers(desc);
            }
        }