1 2 3 4 5 6 7 8 9 10 11 12
package crypto import ( "crypto/rand" "encoding/hex" ) func GenerateSecretKey() string { key := make([]byte, 48) rand.Read(key) return hex.EncodeToString(key) }