llarp::SecretKey
Stores a sodium "secret key" value, which is actually the seed concatenated with the public key. More...
#include <types.hpp>
Public Functions
| Name | |
|---|---|
| ~SecretKey() | |
| SecretKey(const std::array< byte_t, SECKEYSIZE > & buf) | |
| SecretKey(const std::array< byte_t, SEEDSIZE > & seed) | |
| bool | Recalculate() recalculate public component |
| std::string_view | ToString() const |
| PubKey | toPublic() const |
| bool | toPrivate(PrivateKey & key) const Computes the private key from the secret key (which is actually the seed) |
| template <typename fspath_t > bool |
LoadFromFile(const fspath_t & fname) |
| template <typename fspath_t > bool |
SaveToFile(const fspath_t & fname) const |
Detailed Description
struct llarp::SecretKey;
Stores a sodium "secret key" value, which is actually the seed concatenated with the public key.
Note that the seed is not the private key value itself, but rather the seed from which it can be calculated.
Public Functions Documentation
function ~SecretKey
~SecretKey()
function SecretKey
explicit SecretKey(
const std::array< byte_t, SECKEYSIZE > & buf
)
function SecretKey
explicit SecretKey(
const std::array< byte_t, SEEDSIZE > & seed
)
function Recalculate
bool Recalculate()
recalculate public component
function ToString
inline std::string_view ToString() const
function toPublic
inline PubKey toPublic() const
function toPrivate
bool toPrivate(
PrivateKey & key
) const
Computes the private key from the secret key (which is actually the seed)
function LoadFromFile
template <typename fspath_t >
bool LoadFromFile(
const fspath_t & fname
)
function SaveToFile
template <typename fspath_t >
bool SaveToFile(
const fspath_t & fname
) const
Updated on 2026-04-01 at 23:35:39 +0000