mirror of
https://github.com/gortc/stun.git
synced 2025-09-26 20:41:36 +08:00
a:integrity: rename NewLongtermIntegrity to NewLongTermIntegrity
This commit is contained in:
@@ -12,9 +12,9 @@ import (
|
||||
// separator for credentials.
|
||||
const credentialsSep = ":"
|
||||
|
||||
// NewLongtermIntegrity returns new MessageIntegrity with key for long-term
|
||||
// NewLongTermIntegrity returns new MessageIntegrity with key for long-term
|
||||
// credentials. Password and username must be SASL-prepared.
|
||||
func NewLongtermIntegrity(username, realm, password string) MessageIntegrity {
|
||||
func NewLongTermIntegrity(username, realm, password string) MessageIntegrity {
|
||||
// TODO: perform sasl prep.
|
||||
k := strings.Join(
|
||||
[]string{
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMessageIntegrity_AddTo_Simple(t *testing.T) {
|
||||
i := NewLongtermIntegrity("user", "realm", "pass")
|
||||
i := NewLongTermIntegrity("user", "realm", "pass")
|
||||
expected, err := hex.DecodeString("8493fbc53ba582fb4c044c456bdc40eb")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
@@ -86,7 +86,7 @@ func TestRFC5769(t *testing.T) {
|
||||
t.Error("bad realm")
|
||||
}
|
||||
// checking HMAC
|
||||
i := NewLongtermIntegrity(
|
||||
i := NewLongTermIntegrity(
|
||||
"\u30DE\u30C8\u30EA\u30C3\u30AF\u30B9",
|
||||
"example.org",
|
||||
"TheMatrIX",
|
||||
|
Reference in New Issue
Block a user