Esempio n. 1
0
        public void WriteBase64String()
        {
            var text   = new StringWriter();
            var writer = new PresentationWriter(text);

            writer.WriteBase64String(new byte[] { 1, 2, 3 });
            writer.WriteBase64String(new byte[] { 1, 2, 3 }, appendSpace: false);
            Assert.AreEqual("AQID AQID", text.ToString());
        }
Esempio n. 2
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDomainName(Algorithm);
     writer.WriteDateTime(Inception);
     writer.WriteDateTime(Expiration);
     writer.WriteUInt16((ushort)Mode);
     writer.WriteUInt16((ushort)Error);
     writer.WriteBase64String(Key);
     writer.WriteBase64String(OtherData ?? NoData, appendSpace: false);
 }
Esempio n. 3
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDomainName(Algorithm);
     writer.WriteDateTime(TimeSigned);
     writer.WriteTimeSpan16(Fudge);
     writer.WriteBase64String(MAC);
     writer.WriteUInt16(OriginalMessageId);
     writer.WriteUInt16((ushort)Error);
     writer.WriteBase64String(OtherData ?? NoData, appendSpace: false);
 }
Esempio n. 4
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteUInt16((ushort)Flags);
     writer.WriteByte(Protocol);
     writer.WriteByte((byte)Algorithm);
     writer.WriteBase64String(PublicKey, appendSpace: false);
 }
Esempio n. 5
0
 /// <inheritdoc />
 public override void WriteData(PresentationWriter writer)
 {
     writer.WriteDnsType(TypeCovered);
     writer.WriteByte((byte)Algorithm);
     writer.WriteByte(Labels);
     writer.WriteTimeSpan32(OriginalTTL);
     writer.WriteDateTime(SignatureExpiration);
     writer.WriteDateTime(SignatureInception);
     writer.WriteUInt16(KeyTag);
     writer.WriteDomainName(SignerName);
     writer.WriteBase64String(Signature, appendSpace: false);
 }