summaryrefslogtreecommitdiffstats
path: root/lib/rng.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rng.go')
-rw-r--r--lib/rng.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rng.go b/lib/rng.go
index c48f719..f16aeae 100644
--- a/lib/rng.go
+++ b/lib/rng.go
@@ -143,7 +143,9 @@ func MTXORStream(stream, seed []byte) []byte {
return s
}
-func MTPasswordResetToken(seed uint32, length int) string {
+// Returns a "random" token of length `length` using MT19937 seeded
+// with `seed`. The returned token is a hex string.
+func MTToken(seed uint32, length int) string {
if length < 16 {
length = 16 // Default length.
}