sgns::crypto¶
Namespaces¶
| Name |
|---|
| sgns::crypto::constants |
| sgns::crypto::secp256k1 |
Classes¶
| Name | |
|---|---|
| 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. |
Types¶
| Name | |
|---|---|
| enum class | ED25519ProviderError |
| enum class | Pbkdf2ProviderError |
| enum class | Secp256k1ProviderError |
| using base::Blob< constants::ed25519::PRIVKEY_SIZE > | ED25519PrivateKey |
| using base::Blob< constants::ed25519::PUBKEY_SIZE > | ED25519PublicKey |
| using base::Blob< constants::ed25519::SIGNATURE_SIZE > | ED25519Signature |
| using base::Blob< constants::ed25519::SEED_SIZE > | ED25519Seed |
| using Blob< 16 > | Hash128 |
| using Blob< 32 > | Hash256 |
| using Blob< 8 > | Hash64 |
Functions¶
| Name | |
|---|---|
| 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) |
| 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 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 |
using ED25519PrivateKey¶
using ED25519PublicKey¶
using ED25519Signature¶
using ED25519Seed¶
using Hash128¶
using Hash256¶
using Hash64¶
Functions Documentation¶
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 make_twox64¶
function make_twox64¶
function make_twox128¶
function make_twox128¶
function make_twox256¶
function make_twox256¶
Updated on 2026-04-15 at 11:00:39 -0700