document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package main
  2.  
  3. import (
  4.     "fmt"
  5.     "crypto/md5"
  6.     "io"
  7. )
  8.  
  9. func f1() {
  10.     fmt.Println("f1()")
  11.     h := md5.New()
  12.     for i := 0; i < 5; i++ {
  13.         text := fmt.Sprintf("foo%d", i)
  14.         io.WriteString(h, text)
  15.         fmt.Printf("\\t%s: %x\\n", text, h.Sum(nil))
  16.     }  
  17.     fmt.Println()
  18. }
  19.  
  20. func f2() {
  21.     fmt.Println("f2()")
  22.     for i := 0; i < 5; i++ {
  23.         h := md5.New()
  24.         text := fmt.Sprintf("foo%d", i)
  25.         io.WriteString(h, text)
  26.         fmt.Printf("\\t%s: %x\\n", text, h.Sum(nil))
  27.     }  
  28.     fmt.Println()
  29. }
  30.  
  31. func main() {
  32.     f1()
  33.     f2()
  34. }
');