From 0ae60a244615def8101e585625e4ecb3015ac081 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 24 Mar 2025 22:28:22 +0800 Subject: Use sha256.Size rather than 256 --- flags.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flags.go b/flags.go index 1cf8b63..007332c 100644 --- a/flags.go +++ b/flags.go @@ -3,7 +3,10 @@ package main -import "flag" +import ( + "crypto/sha256" + "flag" +) var ( listenAddr string @@ -27,5 +30,5 @@ func init() { flag.IntVar(&idleTimeout, "idle-timeout", 0, "idle timeout in seconds, 0 for no timeout") flag.IntVar(&readHeaderTimeout, "read-header-timeout", 30, "read header timeout in seconds, 0 for no timeout") flag.Parse() - global.NeedBitsReverse = 256 - global.NeedBits + global.NeedBitsReverse = sha256.Size - global.NeedBits } -- cgit v1.2.3