summaryrefslogtreecommitdiff
path: root/pkg/pls/nonce.go
blob: aeab64057d57eaba3ac03b5401e6d2f99230e90c (plain)
1
2
3
4
5
6
7
8
9
10
11
package pls

import (
	"crypto/rand"
)

func GenerateNonce(size int) string {
	nonceBytes := make([]byte, size)
	rand.Read(nonceBytes)
	return string(nonceBytes)
}