Class FingerprintAttribute
The FINGERPRINT attribute MAY be present in all STUN messages. The value of the attribute is computed as the CRC-32 of the STUN message up to (but excluding) the FINGERPRINT attribute itself, XOR'ed with the 32-bit value 0x5354554e (the XOR helps in cases where an application packet is also using CRC-32 in it). The 32-bit CRC is the one defined in ITU V.42 [ITU.V42.2002], which has a generator polynomial of x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1. When present, the FINGERPRINT attribute MUST be the last attribute in the message, and thus will appear after MESSAGE-INTEGRITY.
Inherited Members
Namespace: FM.LiveSwitch.Stun
Assembly: FM.LiveSwitch.dll
Syntax
public class FingerprintAttribute : Attribute
Constructors
FingerprintAttribute()
Initializes a new instance of the FingerprintAttribute class.
Declaration
public FingerprintAttribute()
Properties
MessageBuffer
Gets or sets the message buffer.
Declaration
public DataBuffer MessageBuffer { get; set; }
Property Value
Type | Description |
---|---|
DataBuffer |
TypeValue
Gets the type value.
Declaration
public override int TypeValue { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Methods
GetValueLength()
Gets the length of the attribute value.
Declaration
protected override int GetValueLength()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
ReadValueFrom(DataBuffer, Int32, DataBuffer)
Initializes a new instance of the FingerprintAttribute class.
Declaration
public static FingerprintAttribute ReadValueFrom(DataBuffer buffer, int offset, DataBuffer messageBuffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The buffer. |
System.Int32 | offset | The offset. |
DataBuffer | messageBuffer | The message buffer thus far. |
Returns
Type | Description |
---|---|
FingerprintAttribute |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents this instance. |
Overrides
WriteValueTo(DataBuffer, Int32)
Writes the attribute value to a data buffer.
Declaration
protected override void WriteValueTo(DataBuffer buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The buffer. |
System.Int32 | offset | The offset. |