feat(*): go 后端项目脚手架
This commit is contained in:
10
pkg/common/sha1.go
Normal file
10
pkg/common/sha1.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func Sha1(pwd string) string {
|
||||
return hex.EncodeToString(sha1.New().Sum([]byte(pwd)))
|
||||
}
|
||||
Reference in New Issue
Block a user