🚧 support proxy url

This commit is contained in:
微凉
2021-12-08 10:33:26 +08:00
parent b8698700ef
commit 190c8001a5
11 changed files with 45 additions and 13 deletions

View File

@ -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))
}