Files
base/pkg/crypto/hash.go
2026-04-10 18:25:21 +03:30

14 lines
228 B
Go

package crypto
import (
"crypto/sha256"
"encoding/hex"
"fmt"
)
func Sha256(identifier string) string {
hash := sha256.Sum256([]byte(identifier))
hashStr := hex.EncodeToString(hash[:])
return fmt.Sprintf("%s", hashStr)
}