From a8901ea04d835a32fdbcee8e4acc0f884a3f6782 Mon Sep 17 00:00:00 2001 From: siddharth Date: Sat, 4 Sep 2021 19:00:26 -0400 Subject: lib: MTPasswordResetToken -> MTToken --- lib/rng.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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. } -- cgit v1.2.3