Kagome
Polkadot Runtime Engine in C++17
|
#include <crypto_suites.hpp>
Public Member Functions | |
EcdsaSuite (std::shared_ptr< EcdsaProvider > ecdsa_provider) | |
~EcdsaSuite () override=default | |
outcome::result< EcdsaKeypairAndSeed > | generateRandomKeypair () const noexceptoverride |
outcome::result< EcdsaKeypair > | generateKeypair (const EcdsaSeed &seed) const noexceptoverride |
EcdsaKeypair | composeKeypair (PublicKey pub, PrivateKey priv) const noexceptoverride |
std::pair< PublicKey, PrivateKey > | decomposeKeypair (const EcdsaKeypair &kp) const noexceptoverride |
outcome::result< PublicKey > | toPublicKey (gsl::span< const uint8_t > bytes) const noexceptoverride |
outcome::result< Seed > | toSeed (gsl::span< const uint8_t > bytes) const noexceptoverride |
Public Member Functions inherited from kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed > | |
virtual | ~CryptoSuite ()=default |
Private Attributes | |
std::shared_ptr< EcdsaProvider > | ecdsa_provider_ |
Additional Inherited Members | |
Public Types inherited from kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed > | |
using | PublicKey = EcdsaPublicKey |
using | PrivateKey = EcdsaPrivateKey |
using | Keypair = EcdsaKeypair |
using | KeypairAndSeed = EcdsaKeypairAndSeed |
using | Seed = EcdsaSeed |
Definition at line 75 of file crypto_suites.hpp.
|
inlineexplicit |
Definition at line 81 of file crypto_suites.hpp.
|
overridedefault |
|
inlineoverridevirtualnoexcept |
Create a keypair from a public key and a private key
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 99 of file crypto_suites.hpp.
|
inlineoverridevirtualnoexcept |
Extrace the private key and the public key from a keypair
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 105 of file crypto_suites.hpp.
|
inlineoverridevirtualnoexcept |
Genereate a keypair from
seed | (mind that in some algorithms a seed is a private key) |
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 93 of file crypto_suites.hpp.
|
inlineoverridevirtualnoexcept |
Generate a random keypair (randomness source is determined by an underlying crypto provider)
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 88 of file crypto_suites.hpp.
|
inlineoverridevirtualnoexcept |
Create a public key from its bytes
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 110 of file crypto_suites.hpp.
|
inlineoverridevirtualnoexcept |
Create a seed from its bytes
Implements kagome::crypto::CryptoSuite< EcdsaPublicKey, EcdsaPrivateKey, EcdsaKeypair, EcdsaKeypairAndSeed, EcdsaSeed >.
Definition at line 116 of file crypto_suites.hpp.
|
private |
Definition at line 122 of file crypto_suites.hpp.