mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-01 06:10:26 +08:00
🚧 support proxy url
This commit is contained in:
@ -3,6 +3,7 @@ package utils
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// GetMD5Encode
|
||||
@ -16,3 +17,11 @@ func GetMD5Encode(data string) string {
|
||||
func Get16MD5Encode(data string) string {
|
||||
return GetMD5Encode(data)[8:24]
|
||||
}
|
||||
|
||||
func SignWithPassword(name, password string) string {
|
||||
return Get16MD5Encode(fmt.Sprintf("alist-%s-%s", password, name))
|
||||
}
|
||||
|
||||
func SignWithToken(name, token string) string {
|
||||
return Get16MD5Encode(fmt.Sprintf("alist-%s-%s", token, name))
|
||||
}
|
||||
|
Reference in New Issue
Block a user