From dbfadc5a7e5bd3163b49878994063cd6d869fe6a Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 24 Mar 2025 21:47:40 +0800 Subject: Refactor --- privkey.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'privkey.go') diff --git a/privkey.go b/privkey.go index b12ae4b..7286632 100644 --- a/privkey.go +++ b/privkey.go @@ -10,10 +10,15 @@ import ( ) var ( - privkey = make([]byte, 32) + // The private key used to HMAC the challenge. + privkey = make([]byte, 32) + + // The hash of the private key. We use this as an element of the + // identifier. privkeyHash = make([]byte, 0, sha256.Size) ) +// This init generates a random private key and its hash. func init() { if _, err := rand.Read(privkey); err != nil { log.Fatal(err) -- cgit v1.2.3