Fix bug where I am bad at computer
This commit is contained in:
parent
2fd6077f11
commit
a0deb4012d
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.idea/
|
||||
b2sum
|
@ -12,9 +12,10 @@ import (
|
||||
func C264(i io.Reader) string {
|
||||
hashr, _ := blake2b.New(64, nil)
|
||||
cytes, err := io.ReadAll(i)
|
||||
hashr.Write(cytes)
|
||||
if err != nil {
|
||||
println(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
return base64.StdEncoding.EncodeToString(hashr.Sum(cytes))
|
||||
return base64.StdEncoding.EncodeToString(hashr.Sum(nil))
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
const kayos = `a2F5b3MKeGoC90IBWQPGxv2FJVLScpEvR0DhWEdhiobiF/cfVBnSXhAxr+5YUxOJZESTTrBLkDpoWxRIt1XVb3Aa/pvizg==`
|
||||
const kayos = `Kr+6ONDx+cq/WvhHpQE/4LVuJYi9QHz1TztHNTWwa9KJWqHxfTNLKF3YxrcLptA3wO0KHm83Lq7gpBWgCQzPag==`
|
||||
|
||||
func TestC264(t *testing.T) {
|
||||
soyak := C264(strings.NewReader("kayos\n"))
|
||||
|
Loading…
Reference in New Issue
Block a user