Подготовить HY2XS к production-сборке
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func SHA224String(password string) string {
|
||||
hash := sha256.New224()
|
||||
hash.Write([]byte(password))
|
||||
val := hash.Sum(nil)
|
||||
str := ""
|
||||
for _, v := range val {
|
||||
str += fmt.Sprintf("%02x", v)
|
||||
}
|
||||
return str
|
||||
}
|
||||
Reference in New Issue
Block a user