mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
TEST: Upgrade pion to v3.2.9. (#3567)
------ Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
104cf14d68
commit
df854339ea
1383 changed files with 118469 additions and 41421 deletions
12
trunk/3rdparty/srs-bench/vendor/github.com/pion/stun/integrity.go
generated
vendored
12
trunk/3rdparty/srs-bench/vendor/github.com/pion/stun/integrity.go
generated
vendored
|
@ -1,8 +1,11 @@
|
|||
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package stun
|
||||
|
||||
import (
|
||||
"crypto/md5" // #nosec
|
||||
"crypto/sha1" // #nosec
|
||||
import ( //nolint:gci
|
||||
"crypto/md5" //nolint:gosec
|
||||
"crypto/sha1" //nolint:gosec
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
@ -17,8 +20,7 @@ const credentialsSep = ":"
|
|||
// credentials. Password, username, and realm must be SASL-prepared.
|
||||
func NewLongTermIntegrity(username, realm, password string) MessageIntegrity {
|
||||
k := strings.Join([]string{username, realm, password}, credentialsSep)
|
||||
// #nosec
|
||||
h := md5.New()
|
||||
h := md5.New() //nolint:gosec
|
||||
fmt.Fprint(h, k)
|
||||
return MessageIntegrity(h.Sum(nil))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue