From cbc0a16ea659ae5e045a8c94f0ce862bf7065b5e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 23 Mar 2025 12:03:21 +0800 Subject: Separate privkey stuff --- main.go | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 61fa133..10794ab 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "crypto/hmac" - "crypto/rand" "crypto/sha256" "crypto/subtle" "encoding/base64" @@ -16,20 +15,6 @@ import ( "time" ) -var ( - privkey = make([]byte, 32) - privkeyHash = make([]byte, 0, sha256.Size) -) - -func init() { - if _, err := rand.Read(privkey); err != nil { - log.Fatal(err) - } - h := sha256.New() - h.Write(privkey) - privkeyHash = h.Sum(nil) -} - var reverseProxy *httputil.ReverseProxy func init() { -- cgit v1.2.3