Class Utility
STUN-wide methods.
Inheritance
System.Object
Utility
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FM.LiveSwitch.Stun
Assembly: FM.LiveSwitch.dll
Syntax
public static class Utility
Methods
CreateLongTermKey(String, String, String)
Creates a long term key from the given username, realm, and password by calculating the MD5 hash of their values concatenated as "username:realm:password".
Declaration
public static byte[] CreateLongTermKey(string username, string realm, string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The username. |
System.String | realm | The realm. |
System.String | password | The password. |
Returns
Type | Description |
---|---|
System.Byte[] |
CreateShortTermKey(String)
Creates a short term key from the given password by encoding it as a UTF-8 byte array.
Declaration
public static byte[] CreateShortTermKey(string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | The password. |
Returns
Type | Description |
---|---|
System.Byte[] |