Module exonum::crypto
[−]
[src]
Cryptography related types and functions.
Sodium library is used under the hood through sodiumoxide rust bindings.
Reexports
pub use encoding::serialize::HexValue; |
Structs
Hash |
SHA256 hash. |
PublicKey |
Public key used for verifying signatures. |
SecretKey |
Secret key used for signing. |
Seed |
Seed that can be used for keypair generation. |
Signature |
Signature. |
Enums
FromHexError |
Constants
HASH_SIZE |
Number of bytes in a |
PUBLIC_KEY_LENGTH |
Number of bytes in a |
SECRET_KEY_LENGTH |
Number of bytes in a |
SEED_LENGTH |
Number of bytes in a |
SIGNATURE_LENGTH |
Number of bytes in a |
Functions
gen_keypair |
Randomly generates a secret key and a corresponding public key. |
gen_keypair_from_seed |
Computes a secret key and a corresponding public key from a |
hash |
Calculates |
init |
Initializes the sodium library and chooses faster versions of the primitives if possible. |
sign |
Signs slice of bytes using the signer's secret key. Returns the resulting |
verify |
Verifies that |