package main

import (
"crypto/md5"
"encoding/hex"
"fmt"
)

func main() {
str := "123456"
data := []byte(str)
md5New := md5.New()
md5New.Write(data)
md5String := hex.EncodeToString(md5New.Sum(nil))
fmt.Println(md5String)
// e10adc3949ba59abbe56e057f20f883e
}