Class TSIGRecord
Transaction Signature.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public class TSIGRecord : ResourceRecord, IWireSerialiser, ICloneable, IPresentationSerialiser
Remarks
Defined in RFC 2845.
Constructors
| Improve this Doc View SourceTSIGRecord()
Creates a new instance of the TSIGRecord class.
Declaration
public TSIGRecord()
Fields
| Improve this Doc View SourceGSSTSIG
The Algorithm name for GSSTSIG.
Declaration
public const string GSSTSIG = "gss-tsig"
Field Value
| Type | Description |
|---|---|
| String |
HMACMD5
The Algorithm name for HMACMD5.
Declaration
public const string HMACMD5 = "HMAC-MD5.SIG-ALG.REG.INT"
Field Value
| Type | Description |
|---|---|
| String |
HMACSHA1
The Algorithm name for HMACSHA1.
Declaration
public const string HMACSHA1 = "hmac-sha1"
Field Value
| Type | Description |
|---|---|
| String |
HMACSHA224
The Algorithm name for HMACSHA224.
Declaration
public const string HMACSHA224 = "hmac-sha224"
Field Value
| Type | Description |
|---|---|
| String |
HMACSHA256
The Algorithm name for HMACSHA256.
Declaration
public const string HMACSHA256 = "hmac-sha256"
Field Value
| Type | Description |
|---|---|
| String |
HMACSHA384
The Algorithm name for HMACSHA384.
Declaration
public const string HMACSHA384 = "hmac-sha384"
Field Value
| Type | Description |
|---|---|
| String |
HMACSHA512
The Algorithm name for HMACSHA512.
Declaration
public const string HMACSHA512 = "hmac-sha512"
Field Value
| Type | Description |
|---|---|
| String |
Properties
| Improve this Doc View SourceAlgorithm
Identifies the cryptographic algorithm to create the MAC.
Declaration
public DomainName Algorithm { get; set; }
Property Value
| Type | Description |
|---|---|
| DomainName | Identifies the HMAC alogirthm. |
Error
Expanded error code for TSIG.
Declaration
public MessageStatus Error { get; set; }
Property Value
| Type | Description |
|---|---|
| MessageStatus | NoError, BadSignature BadKey or BadTime. |
Fudge
Permitted error in TimeSigned.
Declaration
public TimeSpan Fudge { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | Defaults to 300 seconds. |
MAC
The message authentication code.
Declaration
public byte[] MAC { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] | The format depends on the Algorithm. |
Remarks
See Protocol Operation for details on generating the MAC.
OriginalMessageId
The Original Id.
Declaration
public ushort OriginalMessageId { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
OtherData
Other data.
Declaration
public byte[] OtherData { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] |
TimeSigned
When the record was signed.
Declaration
public DateTime TimeSigned { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime | Must be in Utc. Resolution in seconds. Defaults to UtcNow less the milliseconds. |
Methods
| Improve this Doc View SourceReadData(PresentationReader)
Read the textual representation of the data that is specific to the resource record Type.
Declaration
public override void ReadData(PresentationReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationReader | reader | The source of the resource record's data. |
Overrides
Remarks
Derived classes must implement this method.
ReadData(WireReader, Int32)
Read the data that is specific to the resource record Type.
Declaration
public override void ReadData(WireReader reader, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| WireReader | reader | The source of the resource record's data. |
| Int32 | length | The length, in bytes, of the data. |
Overrides
Remarks
Derived classes must implement this method.
WriteData(PresentationWriter)
Write the textual representation of the data that is specific to the resource record.
Declaration
public override void WriteData(PresentationWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationWriter | writer | The destination for the resource record's data. |
Overrides
Remarks
Derived classes should implement this method.
By default, this will write the hex encoding of the GetData() preceeded by "#" and the number integer bytes.
WriteData(WireWriter)
Write the data that is specific to the resource record Type.
Declaration
public override void WriteData(WireWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| WireWriter | writer | The destination for the DNS object's data. |
Overrides
Remarks
Derived classes must implement this method.