Documentation ¶
Index ¶
- func Keccak256(data ...[]byte) ([]byte, error)
- func PrivateKeyToHex(k crypto.PrivKey) (string, error)
- func PublicKeyFromBytes(data []byte) (crypto.PubKey, error)
- func PublicKeyFromHex(str string) (crypto.PubKey, error)
- func PublicKeyToHex(k crypto.PubKey) (string, error)
- func RandomEntropy(length int) ([]byte, error)
- func RawPublicToAddress(data []byte) (string, error)
- func RawPublicToAddressBytes(data []byte) ([]byte, error)
- func RestorePrivateKey(privateKey []byte) (crypto.PrivKey, error)
- func Sha1File(path string) (string, error)
- func Sha256(data []byte) []byte
- func XXHashFile(path string) (string, error)
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrivateKeyToHex ¶
PrivateKeyToHex returns the hex value of a PrivKey.
func PublicKeyFromBytes ¶
PublicKeyFromBytes returns a public key from bytes.
func PublicKeyFromHex ¶
PublicKeyFromHex returns a public key from hex.
func PublicKeyToHex ¶
PublicKeyToHex returns the hex value of a pubkey.
func RandomEntropy ¶
RandomEntropy bytes from rand.Reader
func RawPublicToAddress ¶
RawPublicToAddress returns the address of the public key.
func RawPublicToAddressBytes ¶
RawPublicToAddressBytes returns the address of the public key in byte array.
func RestorePrivateKey ¶
RestorePrivateKey unmarshals the privateKey
func XXHashFile ¶
XXHashFile peforms a xxhash hash on a file.
Types ¶
Click to show internal directories.
Click to hide internal directories.