Skip to content

Instantly share code, notes, and snippets.

@theikkila
Created October 18, 2017 10:44
Show Gist options
  • Save theikkila/7a37ad40d0eaabf690946227be0de93e to your computer and use it in GitHub Desktop.
Save theikkila/7a37ad40d0eaabf690946227be0de93e to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io"
"crypto/md5"
)
func md5hex(d string) string {
h := md5.New()
io.WriteString(h, d)
return fmt.Sprintf("%x", h.Sum(nil))
}
func main() {
fmt.Println(md5hex("85.157.236.100" + "|" + "Dalvik/2.1.0 (Linux## U## Android 6.0.1## SM-J510FN Build/MMB29M)"))
}
@theikkila
Copy link
Author

// => 9bd1df3579214553315fc21bd66b5fa5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment