UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
secp256k1::PrivateKey Class Reference

#include <private_key.hpp>

Public Member Functions

 PrivateKey () noexcept=default
 
const fast::Scalarscalar () const noexcept
 
std::array< std::uint8_t, 32 > to_bytes () const
 
bool is_valid () const noexcept
 
 ~PrivateKey ()
 
 PrivateKey (const PrivateKey &other) noexcept
 
PrivateKeyoperator= (const PrivateKey &other) noexcept
 
 PrivateKey (PrivateKey &&other) noexcept
 
PrivateKeyoperator= (PrivateKey &&other) noexcept
 

Static Public Member Functions

static bool from_bytes (const std::uint8_t *bytes32, PrivateKey &out) noexcept
 
static bool from_bytes (const std::array< std::uint8_t, 32 > &bytes, PrivateKey &out) noexcept
 
static PrivateKey wrap (const fast::Scalar &s) noexcept
 

Detailed Description

Definition at line 31 of file private_key.hpp.

Constructor & Destructor Documentation

◆ PrivateKey() [1/3]

secp256k1::PrivateKey::PrivateKey ( )
defaultnoexcept

◆ ~PrivateKey()

secp256k1::PrivateKey::~PrivateKey ( )
inline

Definition at line 78 of file private_key.hpp.

◆ PrivateKey() [2/3]

secp256k1::PrivateKey::PrivateKey ( const PrivateKey other)
inlinenoexcept

Definition at line 81 of file private_key.hpp.

◆ PrivateKey() [3/3]

secp256k1::PrivateKey::PrivateKey ( PrivateKey &&  other)
inlinenoexcept

Definition at line 91 of file private_key.hpp.

Member Function Documentation

◆ from_bytes() [1/2]

static bool secp256k1::PrivateKey::from_bytes ( const std::array< std::uint8_t, 32 > &  bytes,
PrivateKey out 
)
inlinestaticnoexcept

◆ from_bytes() [2/2]

static bool secp256k1::PrivateKey::from_bytes ( const std::uint8_t *  bytes32,
PrivateKey out 
)
inlinestaticnoexcept

◆ is_valid()

bool secp256k1::PrivateKey::is_valid ( ) const
inlinenoexcept

Definition at line 70 of file private_key.hpp.

References secp256k1::fast::Scalar::is_zero().

◆ operator=() [1/2]

PrivateKey & secp256k1::PrivateKey::operator= ( const PrivateKey other)
inlinenoexcept

Definition at line 82 of file private_key.hpp.

◆ operator=() [2/2]

PrivateKey & secp256k1::PrivateKey::operator= ( PrivateKey &&  other)
inlinenoexcept

Definition at line 94 of file private_key.hpp.

◆ scalar()

◆ to_bytes()

std::array< std::uint8_t, 32 > secp256k1::PrivateKey::to_bytes ( ) const
inline

Definition at line 65 of file private_key.hpp.

References secp256k1::fast::Scalar::to_bytes().

◆ wrap()

static PrivateKey secp256k1::PrivateKey::wrap ( const fast::Scalar s)
inlinestaticnoexcept

Definition at line 51 of file private_key.hpp.


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