diff --git a/_cmptest/sha1demo/sha1.go b/_cmptest/sha1demo/sha1.go index e2f0d0ed..dbd813c7 100644 --- a/_cmptest/sha1demo/sha1.go +++ b/_cmptest/sha1demo/sha1.go @@ -3,9 +3,12 @@ package main import ( "crypto/sha1" "fmt" + "io" ) func main() { - data := []byte("This page intentionally left blank.") - fmt.Printf("% x", sha1.Sum(data)) + h := sha1.New() + io.WriteString(h, "The fog is getting thicker!") + io.WriteString(h, "And Leon's getting laaarger!") + fmt.Printf("%x", h.Sum(nil)) } diff --git a/internal/lib/crypto/sha1/sha1.go b/internal/lib/crypto/sha1/sha1.go index 0779e917..93637a51 100644 --- a/internal/lib/crypto/sha1/sha1.go +++ b/internal/lib/crypto/sha1/sha1.go @@ -1,7 +1,6 @@ package sha1 // llgo:skipall - import ( "hash" "unsafe"