thrownewArgumentOutOfRangeException("key",key.Length,string.Format("Cannot be longer than {0}",ushort.MaxValue));
if(other.Length>ushort.MaxValue)
thrownewArgumentOutOfRangeException("other",other.Length,string.Format("Cannot be longer than {0}",ushort.MaxValue));
Algorithm=algorithm;
Inception=inception;
Expiration=expiration;
Mode=mode;
Error=error;
Key=key;
Other=other;
}
/// <summary>
/// Name of the algorithm in domain name syntax.
/// The algorithm determines how the secret keying material agreed to using the TKEY RR is actually used to derive the algorithm specific key.
/// </summary>
publicDnsDomainNameAlgorithm{get;privateset;}
/// <summary>
/// Number of seconds since the beginning of 1 January 1970 GMT ignoring leap seconds treated as modulo 2**32 using ring arithmetic.
/// In messages between a DNS resolver and a DNS server where this field is meaningful,
/// it is either the requested validity interval start for the keying material asked for or
/// specify the validity interval start of keying material provided.
///
/// To avoid different interpretations of the inception time in TKEY RRs,
/// resolvers and servers exchanging them must have the same idea of what time it is.
/// One way of doing this is with the NTP protocol [RFC 2030] but that or any other time synchronization used for this purpose must be done securely.
/// </summary>
publicSerialNumber32Inception{get;privateset;}
/// <summary>
/// Number of seconds since the beginning of 1 January 1970 GMT ignoring leap seconds treated as modulo 2**32 using ring arithmetic.
/// In messages between a DNS resolver and a DNS server where this field is meaningful,
/// it is either the requested validity interval end for the keying material asked for or
/// specify the validity interval end of keying material provided.
///
/// To avoid different interpretations of the expiration time in TKEY RRs,
/// resolvers and servers exchanging them must have the same idea of what time it is.
/// One way of doing this is with the NTP protocol [RFC 2030] but that or any other time synchronization used for this purpose must be done securely.
/// </summary>
publicSerialNumber32Expiration{get;privateset;}
/// <summary>
/// Specifies the general scheme for key agreement or the purpose of the TKEY DNS message.
/// Servers and resolvers supporting this specification must implement the Diffie-Hellman key agreement mode and the key deletion mode for queries.
/// All other modes are optional.
/// A server supporting TKEY that receives a TKEY request with a mode it does not support returns the BADMODE error.
/// </summary>
publicDnsTransactionKeyModeMode{get;privateset;}
/// <summary>
/// When the TKEY Error Field is non-zero in a response to a TKEY query, the DNS header RCODE field indicates no error.
/// However, it is possible if a TKEY is spontaneously included in a response the TKEY RR and DNS header error field could have unrelated non-zero error codes.
/// </summary>
publicDnsResponseCodeError{get;privateset;}
/// <summary>
/// The key exchange data.
/// The meaning of this data depends on the mode.
/// </summary>
publicDataSegmentKey{get;privateset;}
/// <summary>
/// The Other field may be used in future extensions.