example_test.go 418 B

1234567891011121314151617181920
  1. // Copyright 2017 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. package md4_test
  5. import (
  6. "fmt"
  7. "io"
  8. "golang.org/x/crypto/md4"
  9. )
  10. func ExampleNew() {
  11. h := md4.New()
  12. data := "These pretzels are making me thirsty."
  13. io.WriteString(h, data)
  14. fmt.Printf("%x", h.Sum(nil))
  15. // Output: 48c4e365090b30a32f084c4888deceaa
  16. }