```go
package main
import (
"crypto/md5"
"fmt"
"io"
)
func main() {
data := "mima123"
md5er := md5.New()
io.WriteString(md5er, data)
fmt.Printf("%x\n", md5er.Sum(nil))
//output: d9725c9cef2a830ea7bac94e9f14391f
}
```
shell 里面的计算:
```shell
root@hn1:~# echo mima123|md5sum
541ce1e8ce602ab10401ee3c7a424724 -
```