first commit
This commit is contained in:
12
internal/crypto/crypto.go
Normal file
12
internal/crypto/crypto.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package crypto
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func Sha256Hash(key string) []byte {
|
||||
bytes, _ := hex.DecodeString(key)
|
||||
sha256_hash := sha256.Sum256(bytes)
|
||||
return sha256_hash[:]
|
||||
}
|
||||
Reference in New Issue
Block a user