public ResourceRecord Visit(SSHFPResourceRecord record, DnsZoneFormatterContext context) { context.WritePreference(record.AlgorithmNumber); context.WritePreference(record.FingerprintType); context.WriteTag(record.Fingerprint); return(record); }
public ResourceRecord Visit(SSHFPResourceRecord record, DnsZoneParseContext context) { record.AlgorithmNumber = context.ReadPreference(); record.FingerprintType = context.ReadPreference(); record.Fingerprint = context.ReadString(); return(record); }
public void OutputTest() { var zone = new DnsZoneFile(); var record = new SSHFPResourceRecord { Name = "sil.example.com", Class = "IN", AlgorithmNumber = 3, FingerprintType = 1, Fingerprint = @"450c7d19d5da9a3a5b7c19992d1fbde15d8dad34" }; zone.Records.Add(record); string sOutput = zone.ToString(); Assert.AreEqual(";SSHFP records\r\nsil.example.com.\tIN\t\tSSHFP\t3\t1\t450c7d19d5da9a3a5b7c19992d1fbde15d8dad34\t\r\n\r\n", sOutput); }