示例#1
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            Algorithm  = TSigAlgorithmHelper.GetAlgorithmByName(DnsMessageBase.ParseDomainName(resultData, ref startPosition));
            Inception  = ParseDateTime(resultData, ref startPosition);
            Expiration = ParseDateTime(resultData, ref startPosition);
            Mode       = (TKeyMode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            Error      = (ReturnCode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            int keyLength = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            Key = DnsMessageBase.ParseByteData(resultData, ref startPosition, keyLength);
            int otherDataLength = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            OtherData = DnsMessageBase.ParseByteData(resultData, ref startPosition, otherDataLength);
        }
示例#2
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            Algorithm  = TSigAlgorithmHelper.GetAlgorithmByName(DnsMessageBase.ParseDomainName(resultData, ref startPosition));
            TimeSigned = ParseDateTime(resultData, ref startPosition);
            Fudge      = TimeSpan.FromSeconds(DnsMessageBase.ParseUShort(resultData, ref startPosition));
            int macSize = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            Mac        = DnsMessageBase.ParseByteData(resultData, ref startPosition, macSize);
            OriginalID = DnsMessageBase.ParseUShort(resultData, ref startPosition);
            Error      = (ReturnCode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            int otherDataSize = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            OtherData = DnsMessageBase.ParseByteData(resultData, ref startPosition, otherDataSize);
        }