crypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package crypto provides cryptography helper methods.

Package crypto provides cryptography helper methods.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressFromPrivateKey

func AddressFromPrivateKey(privateKey *ecdsa.PrivateKey) *common.Address

AddressFromPrivateKey serializes and converts an ecdsa private key into an address (uses private key pub).

func AddressFromPublicKey

func AddressFromPublicKey(publicKey *ecdsa.PublicKey) *common.Address

AddressFromPublicKey serializes and converts an ecdsa public key into an address.

func Sha3

func Sha3(b []byte) common.Hash

Sha3 hashes a given message via sha3.

func Sha3String

func Sha3String(b []byte) string

Sha3String hashes a given message via sha3 and encodes the hashed message to a hex string.

func Sha3d

func Sha3d(b []byte) common.Hash

Sha3d hashes a given message twice via sha3.

func Sha3dString

func Sha3dString(b []byte) string

Sha3dString hashes a given message via sha3d and encodes the hashed message to a hex string.

func Sha3n

func Sha3n(b []byte, n uint) common.Hash

Sha3n hashes a given message via sha3 n times.

func Sha3nString

func Sha3nString(b []byte, n uint) string

Sha3nString hashes a given message via sha3 n times and encodes the hashed message to a hex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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