package
0.0.0-20200921075319-ce7d804eeb2f
Repository: https://github.com/xunleiblockchain/tc-libs.git
Documentation: pkg.go.dev
# Packages
Package bn256 implements the Optimal Ate pairing over a 256-bit Barreto-Naehrig curve.
Package merkle computes a deterministic minimal height Merkle tree hash.
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
This uses the OS and the Seed(s).
CRandHex returns a hex encoded string that's floor(numDigits/2) * 2 long.
Returns a crand.Reader mixed with user-supplied entropy.
CreateAddress creates an ethereum address given the bytes and the nonce.
CreateAddress2 creates an ethereum address given the address bytes, initial contract code hash and a salt.
CreateContractAddress creates an ethereum address given the bytes and the nonce and the random number.
Ecrecover returns the uncompressed public key that created the given signature.
GenerateAccountKey --.
GenerateNodeKey --.
GeneratePrivKeyFromSecret --.
No description provided by the author
NOTE: secret should be the output of a KDF like bcrypt, if it's derived from user input.
GenPrivKeyGM --.
GenPrivKeyGMFromSecret --.
No description provided by the author
NOTE: secret should be the output of a KDF like bcrypt, if it's derived from user input.
No description provided by the author
No description provided by the author
Keccak256 calculates and returns the Keccak256 hash of the input data.
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
Keccak512 calculates and returns the Keccak512 hash of the input data.
LocalAccountType --.
No description provided by the author
Mix additional bytes of randomness, e.g.
No description provided by the author
NewSignatureGM --.
No description provided by the author
ParseSignatureGM --.
No description provided by the author
No description provided by the author
PubKeyGMFromBytes --.
PubKeySecp256k1FromBytes --.
PubkeyToAddress --.
RegisterAmino registers all crypto related types in the given (amino) codec.
No description provided by the author
S256 returns an instance of the secp256k1 curve.
Sender : Ecrecover sender's Address.
SetLocalAccountType --.
SetLocalNodeType --.
No description provided by the author
No description provided by the author
ValidateSignatureValues verifies whether the signature values are valid with the given chain rules.
VerifySignature checks that the given pubkey created signature over message.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ErrInvalidCryptoType --.
# Structs
PrivKeyGM --.
No description provided by the author
PubKeyGM --.
Implements PubKey.
# Type aliases
An address is a []byte, but hex-encoded even in JSON.
Implements PrivKey.
Implements PubKeyInner.
Implements Signature.
SignatureGM --.
Implements Signature.