mirror of
https://github.com/Estom/notes.git
synced 2026-04-14 02:10:47 +08:00
14 lines
160 B
Go
14 lines
160 B
Go
package main
|
|
|
|
import (
|
|
"crypto/md5"
|
|
"fmt"
|
|
"io"
|
|
)
|
|
|
|
func main() {
|
|
h := md5.New()
|
|
io.WriteString(h, "demo")
|
|
fmt.Printf("%x\n", h.Sum(nil)) // New() Sum()
|
|
}
|