remove deprecated functions

This commit is contained in:
aler9
2023-08-14 11:06:46 +02:00
parent 80106144e6
commit e26ccf0858
32 changed files with 9 additions and 761 deletions

View File

@@ -1,6 +1,7 @@
package auth
import (
"crypto/md5"
"crypto/rand"
"encoding/hex"
"fmt"
@@ -10,6 +11,12 @@ import (
"github.com/bluenviron/gortsplib/v4/pkg/url"
)
func md5Hex(in string) string {
h := md5.New()
h.Write([]byte(in))
return hex.EncodeToString(h.Sum(nil))
}
// GenerateNonce2 generates a nonce that can be used in Validate().
func GenerateNonce2() (string, error) {
byts := make([]byte, 16)
@@ -21,17 +28,6 @@ func GenerateNonce2() (string, error) {
return hex.EncodeToString(byts), nil
}
// GenerateNonce generates a nonce that can be used in Validate().
//
// Deprecated: use GenerateNonce2.
func GenerateNonce() string {
v, err := GenerateNonce2()
if err != nil {
panic(err)
}
return v
}
// GenerateWWWAuthenticate generates a WWW-Authenticate header.
func GenerateWWWAuthenticate(methods []headers.AuthMethod, realm string, nonce string) base.HeaderValue {
if methods == nil {