Documentation
¶
Overview ¶
Package crypto provides cryptography helper methods.
Package crypto provides cryptography helper methods.
Index ¶
- func AddressFromPrivateKey(privateKey *ecdsa.PrivateKey) *common.Address
- func AddressFromPublicKey(publicKey *ecdsa.PublicKey) *common.Address
- func Sha3(b []byte) common.Hash
- func Sha3String(b []byte) string
- func Sha3d(b []byte) common.Hash
- func Sha3dString(b []byte) string
- func Sha3n(b []byte, n uint) common.Hash
- func Sha3nString(b []byte, n uint) string
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 ¶
AddressFromPublicKey serializes and converts an ecdsa public key into an address.
func Sha3String ¶
Sha3String hashes a given message via sha3 and encodes the hashed message to a hex string.
func Sha3dString ¶
Sha3dString hashes a given message via sha3d and encodes the hashed message to a hex string.
func Sha3nString ¶
Sha3nString hashes a given message via sha3 n times and encodes the hashed message to a hex string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.