protected internal override void EncodeRecordData(byte[] messageData, int offset, ref int currentPosition, Dictionary <string, ushort> domainNames) { messageData[currentPosition++] = (byte)HashAlgorithm; messageData[currentPosition++] = Flags; DnsMessageBase.EncodeUShort(messageData, ref currentPosition, Iterations); messageData[currentPosition++] = (byte)Salt.Length; DnsMessageBase.EncodeByteArray(messageData, ref currentPosition, Salt); messageData[currentPosition++] = (byte)NextHashedOwnerName.Length; DnsMessageBase.EncodeByteArray(messageData, ref currentPosition, NextHashedOwnerName); NSecRecord.EncodeTypeBitmap(messageData, ref currentPosition, Types); }
internal override void ParseRecordData(byte[] resultData, int currentPosition, int length) { int endPosition = currentPosition + length; HashAlgorithm = (DnsSecAlgorithm)resultData[currentPosition++]; Flags = resultData[currentPosition++]; Iterations = DnsMessageBase.ParseUShort(resultData, ref currentPosition); int saltLength = resultData[currentPosition++]; Salt = DnsMessageBase.ParseByteData(resultData, ref currentPosition, saltLength); int hashLength = resultData[currentPosition++]; NextHashedOwnerName = DnsMessageBase.ParseByteData(resultData, ref currentPosition, hashLength); Types = NSecRecord.ParseTypeBitMap(resultData, ref currentPosition, endPosition); }