Skip to content

Instantly share code, notes, and snippets.

@saward
Created June 26, 2013 12:14
Show Gist options
  • Save saward/5866928 to your computer and use it in GitHub Desktop.
Save saward/5866928 to your computer and use it in GitHub Desktop.
go crypt test
package main
import (
"crypto/md5"
"hash"
"fmt"
"io"
)
const loops = 5000000
const crypstring = "The fog is getting thicker!"
func many_hashes(h Hash) {
fmt.Printf("Start md5's\n")
for i:= 0; i < loops; i++ {
io.WriteString(h, crypstring)
_ = h.Sum(nil)
}
fmt.Printf("End md5's\n")
}
func main() {
hash := md5.New()
many_hashes(hash)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment