private static Asn1Message ParseApplicationMessage(Asn1Element element) { switch (element.ApplicationTag) { case 0: // SPNEGO InitialContextToken return(ContextToken.Parse(element)); } throw new InvalidDataException(); }
public static object Parse(ReadOnlyMemory <byte> data) { if (ParsedNonGssApiToken(data, out ContextToken token)) { return(token); } var gss = GssApiToken.Decode(data); return(ContextToken.Parse(gss)); }