first commit

This commit is contained in:
lzx
2025-10-16 18:54:27 +08:00
commit a0689dbb09
15 changed files with 3351 additions and 0 deletions

12
internal/crypto/crypto.go Normal file
View 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[:]
}