STUN-wide methods.
More...
|
| static byte[] | createLongTermKey (String username, String realm, String password) |
| | 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". More...
|
| |
| static byte[] | createShortTermKey (String password) |
| | Creates a short term key from the given password by encoding it as a UTF-8 byte array. More...
|
| |
◆ createLongTermKey()
| static byte [] fm.liveswitch.stun.Utility.createLongTermKey |
( |
String |
username, |
|
|
String |
realm, |
|
|
String |
password |
|
) |
| |
|
static |
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".
MD5 is required by RFC 5389 (STUN) and RFC 8656 (TURN) for long-term credential
key derivation. This is a protocol requirement for interoperability with standard
STUN/TURN clients and cannot be changed to a more secure hash without breaking
compatibility. The security of the authentication mechanism relies on HMAC-SHA1
over the derived key, not on MD5's collision resistance.
- Parameters
-
| username | The username. |
| realm | The realm. |
| password | The password. |
◆ createShortTermKey()
| static byte [] fm.liveswitch.stun.Utility.createShortTermKey |
( |
String |
password | ) |
|
|
static |
Creates a short term key from the given password by encoding it as a UTF-8 byte array.
- Parameters
-