Back to godoc.org

Package doublehash

v0.0.0-...-251bbda
Latest Go to latest

The highest tagged major version is .

Published: Feb 5, 2020 | License: BSD-2-Clause | Module: bitbucket.org/dchapes/ripple

Overview

Package doublehash implements double hashing via a hash.Hash.

Index

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier