github.com/spotify/syslog-redirector-golang@v0.0.0-20140320174030-4859f03d829a/src/pkg/crypto/md5/example_test.go (about)

     1  // Copyright 2013 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package md5_test
     6  
     7  import (
     8  	"crypto/md5"
     9  	"fmt"
    10  	"io"
    11  )
    12  
    13  func ExampleNew() {
    14  	h := md5.New()
    15  	io.WriteString(h, "The fog is getting thicker!")
    16  	io.WriteString(h, "And Leon's getting laaarger!")
    17  	fmt.Printf("%x", h.Sum(nil))
    18  	// Output: e2c569be17396eca2a2e3c11578123ed
    19  }