hashutil

package
v0.0.0-...-ba7cdbd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2014 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package hashutil provides utility functions for hashing data.

Functions in this package accept an interface{} argument, which must be one of the following:

  • Any type implementing io.Reader
  • string or *string
  • []byte

Anything else will panic at runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adler32

func Adler32(src interface{}) string

Adler32 returns the Adler-32 hash as a string.

func CRC32

func CRC32(src interface{}) string

CRC32 returns the CRC-32 hash as a string, using the IEEE polynomial.

func CRC64ECMA

func CRC64ECMA(src interface{}) string

CRC64ECMA returns the CRC-64 hash as a string, using the ECMA polynomial.

func CRC64ISO

func CRC64ISO(src interface{}) string

CRC64ISO returns the CRC-64 hash as a string, using the ISO polynomial.

func Fnv32

func Fnv32(src interface{}) string

Fnv32 returns the fnv-1 32 bits hash as a string.

func Fnv32a

func Fnv32a(src interface{}) string

Fnv32a returns the fnv-1a 32 bits hash as a string.

func Fnv64

func Fnv64(src interface{}) string

Fnv64 returns the fnv-1 64 bits hash as a string.

func Fnv64a

func Fnv64a(src interface{}) string

Fnv64a returns the fnv-1a 64 bits hash as a string.

func Md5

func Md5(src interface{}) string

Md5 returns the MD5 hash as a string.

func Sha1

func Sha1(src interface{}) string

Sha1 returns the SHA1 hash as a string.

func Sha224

func Sha224(src interface{}) string

Sha224 returns the SHA224 hash as a string.

func Sha256

func Sha256(src interface{}) string

Sha256 returns the SHA256 hash as a string.

func Sha512

func Sha512(src interface{}) string

Sha512 returns the SHA512 hash as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL