EthWallet.Utils.Crypto (eth_wallet v0.0.7)
Crypto Lib
Link to this section Summary
Link to this section Functions
Link to this function
decrypt_key(payload, password)
Link to this function
double_sha256(data)
Specs
Link to this function
encrypt_key(encrypted_key, password)
Link to this function
generate_key_secp256k1()
Link to this function
generate_key_secp256k1(privkey)
Link to this function
kec(data)
Link to this function
pubkey_to_address(public_key)
Link to this function
ripemd160(data)
Link to this function
secp256k1_sign(data, privkey)
Link to this function
secp256k1_verify(data, sig, pubkey)
Link to this function
sha256(data)
Link to this function
sign_hash(hash, privkey, chain_id \\ nil)
Specs
sign_hash(<<_::256>>, <<_::256>>, nil | integer()) :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}
sign_hash(<<_::256>>, <<_::512>>, binary()) :: {non_neg_integer(), non_neg_integer(), non_neg_integer()}
The test is here:
https://github.com/exthereum/exth_crypto/blob/master/lib/signature/signature.ex
Attention: hash should be 32 bytes.
Link to this function
verify_hash(hash, sig, pubkey)
The test is here:
https://github.com/exthereum/exth_crypto/blob/master/lib/signature/signature.ex
Attention: hash should be 32 bytes.