BitSHA

package
v0.0.0-...-8b651fe Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2017 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package hash provides interfaces for hash functions.

Package sha256 implements the SHA224 and SHA256 hash algorithms as defined in FIPS 180-2.

SHA256 block step. In its own file so that a faster assembly or C version can be substituted easily.

Index

Constants

View Source
const Size = 32

The size of a SHA256 checksum in bytes.

View Source
const Size224 = 28

The size of a SHA224 checksum in bytes.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash interface {
	// Write adds more data to the running hash.
	// It never returns an error.
	io.Writer

	// Sum returns the current hash, without changing the
	// underlying hash state.
	Sum() []byte

	// Reset resets the hash to one with zero bytes written.
	Reset()

	//Gives a copy of the digest structure
	Copy() Hash

	//Calculates the midstate of a SHA hash
	Midstate() []byte

	// Size returns the number of bytes Sum will return.
	Size() int
}

Hash is the common interface implemented by all hash functions.

func New

func New() Hash

New returns a new Hash computing the SHA256 checksum.

func New224

func New224() Hash

New224 returns a new Hash computing the SHA224 checksum.

type Hash32

type Hash32 interface {
	Hash
	Sum32() uint32
}

Hash32 is the common interface implemented by all 32-bit hash functions.

type Hash64

type Hash64 interface {
	Hash
	Sum64() uint64
}

Hash64 is the common interface implemented by all 64-bit hash functions.

Jump to

Keyboard shortcuts

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