Files
llgo/_cmptest/sha1demo/sha1.go

15 lines
218 B
Go
Raw Normal View History

2024-07-31 13:56:42 +08:00
package main
import (
"crypto/sha1"
"fmt"
2024-07-31 14:28:15 +08:00
"io"
2024-07-31 13:56:42 +08:00
)
func main() {
2024-07-31 14:28:15 +08:00
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))
2024-07-31 13:56:42 +08:00
}