11 lines
148 B
Go
11 lines
148 B
Go
package common
|
|
|
|
import (
|
|
"crypto/sha1"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func Sha1(pwd string) string {
|
|
return hex.EncodeToString(sha1.New().Sum([]byte(pwd)))
|
|
}
|