Sum in Go

Posted by GoDoc
Public (Editable by Users)

Sum returns the MD5 checksum of the data.

Go
Edit
package main

import (
	"crypto/md5"
	"fmt"
)

func main() {
	data := []byte("These pretzels are making me thirsty.")
	fmt.Printf("%x", md5.Sum(data))
}