Package Peach :: Package Generators :: Module stun :: Class StunUsernameAttribute
[hide private]

Class StunUsernameAttribute

source code


USERNAME

The USERNAME attribute is used for message integrity. It serves as a means to identify the shared secret used in the message integrity check. The USERNAME is always present in a Shared Secret Response, along with the PASSWORD. It is optionally present in a Binding Request when message integrity is used.

The value of USERNAME is a variable length opaque value. Its length MUST be a multiple of 4 (measured in bytes) in order to guarantee alignment of attributes on word boundaries.

Instance Methods [hide private]
 
__init__(self, group, username) source code

Inherited from StunAttribute: getRawValue

Inherited from StunAttribute (private): _getValue

Class Variables [hide private]

Inherited from StunAttribute: CHANGED_ADDRESS, CHANGE_REQUEST, ERROR_CODE, MAPPED_ADDRESS, MESSAGE_INTEGRITY, PASSWORD, REFLECTED_FROM, RESPONSE_ADDRESS, SOURCE_ADDRESS, UNKNOWN_ATTRIBUTES, USERNAME

Inherited from StunAttribute (private): _generator, _length, _type

Method Details [hide private]

__init__(self, group, username)
(Constructor)

source code 
Parameters:
  • group (Group) - Group to use
  • username (Generator) - Username
Overrides: StunAttribute.__init__