public void DomainX500DecodingSlashes() { var encoding = new KrbTransitedEncoding() { Type = TransitedEncodingType.DomainX500Compress, Contents = new ReadOnlyMemory <byte>(Encoding.UTF8.GetBytes("\"/COM,/HP,/APOLLO, /COM/DEC\".")) }; encoding.DecodeTransit(); }
public void DomainX500Encoding() { foreach (var kv in EncodingTestCases) { var encoding = new KrbTransitedEncoding(); encoding.EncodeTransit(kv.Value); string encoded = Encoding.UTF8.GetString(encoding.Contents.ToArray()); Assert.AreEqual(kv.Key, encoded); var decodedRealms = encoding.DecodeTransit(); Assert.IsTrue(kv.Value.SequenceEqual(decodedRealms)); } }
public void DomainX500EncodingSlashes() { var encoding = new KrbTransitedEncoding(); encoding.EncodeTransit(new[] { "/COM/HP/APOLLO", "/COM/HP", "/COM" }); }