func getFileMD5(fileName string) string { cmd := exec.Command("cmd", "/C", "CertUtil", "-hashfile", fileName, "MD5|findstr", "/V", ":") out, _ := cmd.Output() cmd.Run() str := string(out[:]) str = strings.Replace(str, " ", "", -1) return str[:32] }
golang call CertUtil get the md5
Guess you like
Origin www.cnblogs.com/sherlock-merlin/p/11566972.html
Recommended
Ranking