Noble Connect
Add relays and punchthrough to Mirror or UNet
NobleConnect.Stun.ShortTermCredentials Class Reference

Credentials used for authenticating messages More...

Inherits NobleConnect.Stun.Credentials.

Inherited by NobleConnect.Ice.IceCredentials, and NobleConnect.Stun.LongTermCredentials.

Public Member Functions

 ShortTermCredentials (string username, string password)
 
override void CalculateHashKey ()
 The hashKey is a UTF-8 encoding of the password More...
 
override bool IsValid ()
 
override bool ValidateMessageCredentials (Message m)
 
override bool ValidateMessageIntegrity (Message m, byte[] rawBytes)
 
override void AddCredentialsToAttributes (List< Attribute > attributes)
 
- Public Member Functions inherited from NobleConnect.Stun.Credentials
virtual bool ValidateMessage (Message m, byte[] rawBytes)
 
virtual AttributeRaw GenerateMessageIntegrityAttribute (MessageHeader header, List< Attribute > attributes)
 
byte[] ComputeHash (BufferView bytesSoFar)
 Use HMACSHA1 along with the hash key and buffer data to generate the message integrity hash More...
 
byte[] ComputeHash (byte[] messageBytes, int offset=0, int length=-1)
 Use HMACSHA1 along with the hash key and buffer data to generate the message integrity hash More...
 

Public Attributes

string password
 The password is set via configuratio on the Stun server and clients More...
 
- Public Attributes inherited from NobleConnect.Stun.Credentials
AttributeString username
 The username is set via configuration on the Stun server and clients More...
 

Additional Inherited Members

- Protected Attributes inherited from NobleConnect.Stun.Credentials
byte[] hashKey
 This is used as the key to an HMACSHA1 hash of the message contents that is sent as the Value of a MessageIntegrity attribute. More...
 

Detailed Description

Credentials used for authenticating messages

Constructor & Destructor Documentation

◆ ShortTermCredentials()

NobleConnect.Stun.ShortTermCredentials.ShortTermCredentials ( string  username,
string  password 
)

Member Function Documentation

◆ AddCredentialsToAttributes()

override void NobleConnect.Stun.ShortTermCredentials.AddCredentialsToAttributes ( List< Attribute attributes)
virtual

Reimplemented from NobleConnect.Stun.Credentials.

◆ CalculateHashKey()

override void NobleConnect.Stun.ShortTermCredentials.CalculateHashKey ( )
virtual

The hashKey is a UTF-8 encoding of the password

This is used as the key to an HMACSHA1 hash of the message contents that is sent as the Value of a MessageIntegrity attribute.

Implements NobleConnect.Stun.Credentials.

◆ IsValid()

override bool NobleConnect.Stun.ShortTermCredentials.IsValid ( )
virtual

◆ ValidateMessageCredentials()

override bool NobleConnect.Stun.ShortTermCredentials.ValidateMessageCredentials ( Message  m)
virtual

◆ ValidateMessageIntegrity()

override bool NobleConnect.Stun.ShortTermCredentials.ValidateMessageIntegrity ( Message  m,
byte[]  rawBytes 
)
virtual

Member Data Documentation

◆ password

string NobleConnect.Stun.ShortTermCredentials.password

The password is set via configuratio on the Stun server and clients