15 lines
203 B
Go
15 lines
203 B
Go
|
package service
|
||
|
|
||
|
import (
|
||
|
"crypto/sha256"
|
||
|
"encoding/hex"
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func Test1(t *testing.T) {
|
||
|
h := sha256.Sum256([]byte("123"))
|
||
|
passHash := hex.EncodeToString(h[:])
|
||
|
fmt.Print(passHash)
|
||
|
}
|