Documentation ¶
Index ¶
- func FromECDSAPub(pub *ecdsa.PublicKey) []byte
- func Keccak256(data ...[]byte) []byte
- func Keccak256Hash(data ...[]byte) (h types.Hash)
- func MerkleTree(list interface{}) (types.Hash, error)
- func PrivKeyToAddress(privKey []byte) types.Address
- func PubKeyToAddress(pubKey []byte) (types.Address, error)
- func S256() elliptic.Curve
- func ToECDSAUnsafe(d []byte) *ecdsa.PrivateKey
- func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromECDSAPub ¶
func Keccak256Hash ¶
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
func PrivKeyToAddress ¶
PubKeyToAddress calculates the wallet address from the user's private key
func PubKeyToAddress ¶
PubKeyToAddress calculates the wallet address from the user's public key
func ToECDSAUnsafe ¶
func ToECDSAUnsafe(d []byte) *ecdsa.PrivateKey
ToECDSAUnsafe blindly converts a binary blob to a private key. It should almost never be used unless you are sure the input is valid and want to avoid hitting errors due to bad origin encoding (0 prefixes cut off).
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package math provides integer math utilities.
|
Package math provides integer math utilities. |
Package rlp implements the RLP serialization format.
|
Package rlp implements the RLP serialization format. |
Package secp256k1 wraps the bitcoin secp256k1 C library.
|
Package secp256k1 wraps the bitcoin secp256k1 C library. |
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
Click to show internal directories.
Click to hide internal directories.