mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
24 lines
345 B
Go
24 lines
345 B
Go
package gortsplib
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func md5Hex(in string) string {
|
|
h := md5.New()
|
|
h.Write([]byte(in))
|
|
return hex.EncodeToString(h.Sum(nil))
|
|
}
|
|
|
|
// AuthMethod is an authentication method.
|
|
type AuthMethod int
|
|
|
|
const (
|
|
// Basic authentication method
|
|
Basic AuthMethod = iota
|
|
|
|
// Digest authentication method
|
|
Digest
|
|
)
|