doublehash

package
v0.0.0-...-251bbda Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package doublehash implements double hashing via a hash.Hash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(inner, outer crypto.Hash) hash.Hash

New returns a new hash.Hash that computes a double hash. The hashes are specified by name, e.g. crypto.SHA256.

func NewHash

func NewHash(inner, outer hash.Hash) hash.Hash

NewHash returns a new hash.Hash that computes a double hash.

func SumDoubleSha256

func SumDoubleSha256(data []byte) [sha256.Size]byte

SumDoubleSha256 is a convience function that returns the double sha256 hash of the data.

func SumSha256Ripemd160

func SumSha256Ripemd160(data []byte) (sum160 [ripemd160Size]byte)

SumSha256Ripemd160 is a convience function that returns the ripemd160 hash of the sha256 hash of the data. SumSha256Ripemd160 panics if the crypto.RIPEMD160 hash is not linked into the binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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