Class StunMessageIntegrityAttribute
source code
MESSAGE-INTEGRITY
The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [13] of the STUN
message. It can be present in Binding Requests or Binding Responses.
Since it uses the SHA1 hash, the HMAC will be 20 bytes. The text used as
input to HMAC is the STUN message, including the header, up to and
including the attribute preceding the MESSAGE- INTEGRITY attribute. That
text is then padded with zeroes so as to be a multiple of 64 bytes. As a
result, the MESSAGE-INTEGRITY attribute MUST be the last attribute in any
STUN message. The key used as input to HMAC depends on the context.
|
Inherited from StunAttribute:
CHANGED_ADDRESS,
CHANGE_REQUEST,
ERROR_CODE,
MAPPED_ADDRESS,
MESSAGE_INTEGRITY,
PASSWORD,
REFLECTED_FROM,
RESPONSE_ADDRESS,
SOURCE_ADDRESS,
UNKNOWN_ATTRIBUTES,
USERNAME
|