mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-12 13:10:05 +00:00
12 lines
197 B
Go
12 lines
197 B
Go
package crypto
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func HashSHA256(text string) string {
|
|
hasher := sha256.New()
|
|
hasher.Write([]byte(text))
|
|
return hex.EncodeToString(hasher.Sum(nil))
|
|
}
|