summaryrefslogtreecommitdiff
path: root/internal/cryptocore/nonce.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cryptocore/nonce.go')
-rw-r--r--internal/cryptocore/nonce.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/cryptocore/nonce.go b/internal/cryptocore/nonce.go
index 6b0c31d..973d2d8 100644
--- a/internal/cryptocore/nonce.go
+++ b/internal/cryptocore/nonce.go
@@ -10,7 +10,7 @@ import (
"github.com/rfjakob/gocryptfs/internal/tlog"
)
-// Get "n" random bytes from /dev/urandom or panic
+// RandBytes gets "n" random bytes from /dev/urandom or panics
func RandBytes(n int) []byte {
b := make([]byte, n)
_, err := rand.Read(b)
@@ -20,7 +20,7 @@ func RandBytes(n int) []byte {
return b
}
-// Return a secure random uint64
+// RandUint64 returns a secure random uint64
func RandUint64() uint64 {
b := RandBytes(8)
return binary.BigEndian.Uint64(b)