Files
llgo/_cmptest/sha256demo/sha256.go

15 lines
222 B
Go
Raw Normal View History

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