feat: add aliyundrive driver

This commit is contained in:
Noah Hsu
2022-08-31 20:46:19 +08:00
parent 102384e170
commit 817d63597e
9 changed files with 579 additions and 0 deletions

19
pkg/utils/hash.go Normal file
View File

@ -0,0 +1,19 @@
package utils
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
)
func GetSHA1Encode(data string) string {
h := sha1.New()
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}
func GetMD5Encode(data string) string {
h := md5.New()
h.Write([]byte(data))
return hex.EncodeToString(h.Sum(nil))
}