Пример #1
0
        private static Asn1Message ParseApplicationMessage(Asn1Element element)
        {
            switch (element.ApplicationTag)
            {
            case 0:     // SPNEGO InitialContextToken
                return(ContextToken.Parse(element));
            }

            throw new InvalidDataException();
        }
Пример #2
0
        public static object Parse(ReadOnlyMemory <byte> data)
        {
            if (ParsedNonGssApiToken(data, out ContextToken token))
            {
                return(token);
            }

            var gss = GssApiToken.Decode(data);

            return(ContextToken.Parse(gss));
        }