Forge v0.5.2 Forge.Crypto View Source
Crypto related functions
Link to this section Summary
Functions
Create a random private key
Create a public key based on private key
Create wallet address based on public key
Sign data with private key
Verify signature with public key
Generate a tendermint tx hash based on tx data
Generate an Ethereum compatible sha3
Link to this section Functions
Create a random private key
Create a public key based on private key
Create wallet address based on public key
Sign data with private key
Verify signature with public key
Generate a tendermint tx hash based on tx data
iex> Forge.Crypto.get_tx_hash(“hello”) “2CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C”
Generate an Ethereum compatible sha3
iex> Forge.Crypto.sha3(“hello”) <<28, 138, 255, 149, 6, 133, 194, 237, 75, 195, 23, 79, 52, 114, 40, 123, 86, 217, 81, 123, 156, 148, 129, 39, 49, 154, 9, 167, 163, 109, 234, 200>>
iex> Forge.Crypto.sha3(“hello”, :upper) “1C8AFF950685C2ED4BC3174F3472287B56D9517B9C948127319A09A7A36DEAC8”
iex> Forge.Crypto.sha3(“hello”, :lower) “1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8”