PrivMX Endpoint v2.7.0
Loading...
Searching...
No Matches
privmx::endpoint::crypto::ExtKey Class Reference

#include <privmx/endpoint/crypto/ExtKey.hpp>

Public Member Functions

 ExtKey ()
 ExtKey (const privmx::crypto::ExtKey &impl)
ExtKey derive (uint32_t index) const
ExtKey deriveHardened (uint32_t index) const
std::string getPrivatePartAsBase58 () const
std::string getPublicPartAsBase58 () const
std::string getPrivateKey () const
std::string getPublicKey () const
core::Buffer getPrivateEncKey () const
std::string getPublicKeyAsBase58Address () const
core::Buffer getChainCode () const
 Gets the chain code of Extended Key.
bool verifyCompactSignatureWithHash (const core::Buffer &message, const core::Buffer &signature) const
 Validates a signature of a message.
bool isPrivate () const

Static Public Member Functions

static ExtKey fromSeed (const core::Buffer &seed)
static ExtKey fromBase58 (const std::string &base58)
static ExtKey generateRandom ()

Detailed Description

'ExtKey' is a class representing Extended keys and operations on it.

Constructor & Destructor Documentation

◆ ExtKey() [1/2]

privmx::endpoint::crypto::ExtKey::ExtKey ( )

//doc-gen:ignore

◆ ExtKey() [2/2]

privmx::endpoint::crypto::ExtKey::ExtKey ( const privmx::crypto::ExtKey & impl)

//doc-gen:ignore

Member Function Documentation

◆ derive()

ExtKey privmx::endpoint::crypto::ExtKey::derive ( uint32_t index) const

Generates child ExtKey from a current ExtKey using BIP32.

Parameters
indexnumber from 0 to 2^31-1
Returns
ExtKey object

◆ deriveHardened()

ExtKey privmx::endpoint::crypto::ExtKey::deriveHardened ( uint32_t index) const

Generates hardened child ExtKey from a current ExtKey using BIP32.

Parameters
indexnumber from 0 to 2^31-1
Returns
ExtKey object

◆ fromBase58()

ExtKey privmx::endpoint::crypto::ExtKey::fromBase58 ( const std::string & base58)
static

Decodes ExtKey from Base58 format.

Parameters
base58the ExtKey in Base58
Returns
ExtKey object

◆ fromSeed()

ExtKey privmx::endpoint::crypto::ExtKey::fromSeed ( const core::Buffer & seed)
static

Creates ExtKey from given seed.

Parameters
seedthe seed used to generate Key
Returns
ExtKey object

◆ generateRandom()

ExtKey privmx::endpoint::crypto::ExtKey::generateRandom ( )
static

Generates a new ExtKey.

Returns
ExtKey object

◆ getChainCode()

core::Buffer privmx::endpoint::crypto::ExtKey::getChainCode ( ) const

Gets the chain code of Extended Key.

Returns
Raw chain code

◆ getPrivateEncKey()

core::Buffer privmx::endpoint::crypto::ExtKey::getPrivateEncKey ( ) const

Extracts raw ECC PrivateKey.

Returns
ECC PrivateKey

◆ getPrivateKey()

std::string privmx::endpoint::crypto::ExtKey::getPrivateKey ( ) const

Extracts ECC PrivateKey.

Returns
ECC key in WIF format

◆ getPrivatePartAsBase58()

std::string privmx::endpoint::crypto::ExtKey::getPrivatePartAsBase58 ( ) const

Converts ExtKey to Base58 string.

Returns
ExtKey in Base58 format

◆ getPublicKey()

std::string privmx::endpoint::crypto::ExtKey::getPublicKey ( ) const

Extracts ECC PublicKey.

Returns
ECC key in BASE58DER format

◆ getPublicKeyAsBase58Address()

std::string privmx::endpoint::crypto::ExtKey::getPublicKeyAsBase58Address ( ) const

Extracts ECC PublicKey Address.

Returns
ECC Address in BASE58 format

◆ getPublicPartAsBase58()

std::string privmx::endpoint::crypto::ExtKey::getPublicPartAsBase58 ( ) const

Converts the public part of ExtKey to Base58 string.

Returns
ExtKey in Base58 format

◆ isPrivate()

bool privmx::endpoint::crypto::ExtKey::isPrivate ( ) const

Checks if ExtKey is Private.

Returns
returns true if ExtKey is private

◆ verifyCompactSignatureWithHash()

bool privmx::endpoint::crypto::ExtKey::verifyCompactSignatureWithHash ( const core::Buffer & message,
const core::Buffer & signature ) const

Validates a signature of a message.

Parameters
messagedata used on validation
signaturesignature of data to verify
Returns
message validation result

The documentation for this class was generated from the following file: