diff options
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/pls/nonce.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/pls/nonce.go b/pkg/pls/nonce.go new file mode 100644 index 0000000..aeab640 --- /dev/null +++ b/pkg/pls/nonce.go @@ -0,0 +1,11 @@ +package pls + +import ( + "crypto/rand" +) + +func GenerateNonce(size int) string { + nonceBytes := make([]byte, size) + rand.Read(nonceBytes) + return string(nonceBytes) +} |
