From 3291d5e5cca66c06a5b89f28f4566f7c6073bccc Mon Sep 17 00:00:00 2001 From: xing Date: Mon, 31 Oct 2022 20:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpass/phpass.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpass/phpass.go b/phpass/phpass.go index b1b5d17..9806517 100644 --- a/phpass/phpass.go +++ b/phpass/phpass.go @@ -64,10 +64,7 @@ func (p *PasswordHash) getRandomBytes(count int) (r string, err error) { func (p *PasswordHash) Encode64(input string, count int) (out string) { i := 0 s := strings.Builder{} - for { - if i >= count { - break - } + for i < count { v := 0 if i < len(input) { v = int(input[i])