sgns::crypto¶
Namespaces¶
| Name |
|---|
| sgns::crypto::bip39 |
| sgns::crypto::store |
| sgns::crypto::key_types |
| sgns::crypto::constants |
| sgns::crypto::secp256k1 |
Classes¶
| Name | |
|---|---|
| class | sgns::crypto::Bip39Provider Interface for creating BIP-39 entropy and seeds from mnemonic wordlists. |
| class | sgns::crypto::Bip39ProviderImpl |
| class | sgns::crypto::CryptoStore |
| class | sgns::crypto::CryptoStoreImpl |
| class | sgns::crypto::ED25519ProviderImpl |
| class | sgns::crypto::ED25519Provider |
| struct | sgns::crypto::ED25519Keypair |
| class | sgns::crypto::Hasher |
| class | sgns::crypto::HasherImpl |
| class | sgns::crypto::Pbkdf2ProviderImpl |
| class | sgns::crypto::Pbkdf2Provider Interface for PBKDF2 key derivation. |
| class | sgns::crypto::Secp256k1ProviderImpl |
| class | sgns::crypto::Secp256k1Provider Interface for secp256k1 public key recovery. |
| class | sgns::crypto::SR25519ProviderImpl |
| class | sgns::crypto::SR25519Provider |
| struct | sgns::crypto::VRFOutput |
| struct | sgns::crypto::VRFVerifyOutput |
| struct | sgns::crypto::SR25519Keypair |
| class | sgns::crypto::VRFProviderImpl |
| class | sgns::crypto::VRFProvider |
Types¶
Functions¶
| Name | |
|---|---|
| std::ostream & | operator<<(std::ostream & out, const CryptoStoreError & test_struct) |
| bool | isSupportedKeyType(KeyTypeId k) checks whether key type value is supported |
| std::string | decodeKeyTypeId(KeyTypeId param) makes string representation of KeyTypeId |
| outcome::result< int > | validateRecoveryId(int v) |
| base::Hash256 | sha256(std::string_view input) |
| base::Hash256 | sha256(gsl::span< const uint8_t > input) |
| std::vector< uint8_t > | sha256(const void * data, size_t dataSize) |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator<<(Stream & s, const VRFOutput & o) outputs object of type VRFOutput to stream |
| template <class Stream ,typename =std::enable_if_t Stream & |
operator>>(Stream & s, VRFOutput & o) decodes object of type VRFOutput from stream |
| void | make_twox64(const uint8_t * in, uint32_t len, uint8_t * out) |
| base::Hash64 | make_twox64(gsl::span< const uint8_t > buf) |
| void | make_twox128(const uint8_t * in, uint32_t len, uint8_t * out) |
| base::Hash128 | make_twox128(gsl::span< const uint8_t > buf) |
| void | make_twox256(const uint8_t * in, uint32_t len, uint8_t * out) |
| base::Hash256 | make_twox256(gsl::span< const uint8_t > buf) |
Types Documentation¶
enum CryptoStoreError¶
| Enumerator | Value | Description |
|---|---|---|
| WRONG_KEYFILE_NAME | 1 | |
| UNSUPPORTED_KEY_TYPE | ||
| UNSUPPORTED_CRYPTO_TYPE | ||
| NOT_REGULAR_FILE | ||
| FAILED_OPEN_FILE | ||
| FILE_DOESNT_EXIST | ||
| INVALID_FILE_FORMAT | ||
| INCONSISTENT_KEYFILE | ||
| WRONG_SEED_SIZE | ||
| KEY_NOT_FOUND | ||
| KEYS_PATH_IS_NOT_DIRECTORY | ||
| FAILED_CREATE_KEYS_DIRECTORY |
enum KeyTypeError¶
| Enumerator | Value | Description |
|---|---|---|
| UNSUPPORTED_KEY_TYPE | 1 | |
| UNSUPPORTED_KEY_TYPE_ID |
enum ED25519ProviderError¶
| Enumerator | Value | Description |
|---|---|---|
| FAILED_GENERATE_KEYPAIR | 1 | |
| SIGN_UNKNOWN_ERROR | ||
| VERIFY_UNKNOWN_ERROR |
enum Pbkdf2ProviderError¶
| Enumerator | Value | Description |
|---|---|---|
| KEY_DERIVATION_FAILED | 1 |
enum Secp256k1ProviderError¶
| Enumerator | Value | Description |
|---|---|---|
| INVALID_ARGUMENT | 1 | |
| INVALID_V_VALUE | ||
| INVALID_R_OR_S_VALUE | ||
| INVALID_SIGNATURE | ||
| RECOVERY_FAILED |
enum SR25519ProviderError¶
| Enumerator | Value | Description |
|---|---|---|
| SIGN_UNKNOWN_ERROR | 1 | |
| VERIFY_UNKNOWN_ERROR |
sr25519 provider error codes
using DirectoryIterator¶
using KeyTypeId¶
Key type identifier.
using ED25519PrivateKey¶
using ED25519PublicKey¶
using ED25519Signature¶
using ED25519Seed¶
using RandomGenerator¶
using CSPRNG¶
using BoostRandomGenerator¶
using VRFPreOutput¶
using VRFThreshold¶
using VRFProof¶
using SR25519SecretKey¶
using SR25519PublicKey¶
using SR25519Seed¶
using SR25519Signature¶
using Hash128¶
using Hash256¶
using Hash64¶
Functions Documentation¶
function operator<<¶
function isSupportedKeyType¶
checks whether key type value is supported
Parameters:
- k key type value
Return: true if supported, false otherwise
function decodeKeyTypeId¶
makes string representation of KeyTypeId
Parameters:
- param param key type
Return: string representation of key type value
function validateRecoveryId¶
function sha256¶
Parameters:
- input to be hashed
Return: hashed bytes
Take a SHA-256 hash from string
function sha256¶
Parameters:
- input to be hashed
Return: hashed bytes
Take a SHA-256 hash from bytes
function sha256¶
function operator<<¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_encoder_stream>>
Stream & operator<<(
Stream & s,
const VRFOutput & o
)
outputs object of type VRFOutput to stream
Parameters:
- s stream reference
- o value to output
Template Parameters:
- Stream output stream type
Return: reference to stream
function operator>>¶
template <class Stream ,
typename =std::enable_if_t<Stream::is_decoder_stream>>
Stream & operator>>(
Stream & s,
VRFOutput & o
)
decodes object of type VRFOutput from stream
Parameters:
- s stream reference
- o value to output
Template Parameters:
- Stream input stream type
Return: reference to stream
function make_twox64¶
function make_twox64¶
function make_twox128¶
function make_twox128¶
function make_twox256¶
function make_twox256¶
Updated on 2026-03-04 at 13:10:43 -0800