9#include "crypto/crypto.h"
33 explicit KeyStore(
const std::array<uint8_t, 32>& key)
noexcept;
41 explicit KeyStore(
const uint8_t* key,
size_t size);
47 explicit KeyStore(crypto::secret_key key)
noexcept;
52 void set(
const std::array<uint8_t, 32>& key)
noexcept;
60 void set(
const uint8_t* key,
size_t size);
65 void set(crypto::secret_key key)
noexcept;
114 explicit operator crypto::secret_key&();
134 operator const crypto::secret_key&() const;
148 operator const
unsigned char*() const;
162 operator const
char*() const;
176 operator std::array<
unsigned char, 32>() const;
198 mutable
bool m_lock = true;
201 mutable
bool m_writeable = false;
204 mutable
bool m_unlock_once = false;
207 mutable
bool m_writeable_once = false;
holds monero internal account and internal functions
Definition account.hpp:40
essentialy wraps crypto::secret_key
Definition key-store.hpp:18
~KeyStore() noexcept
Destroy KeyStore.
Definition key-store.cpp:108
void set(const std::array< uint8_t, 32 > &key) noexcept
set key from byte array
Definition key-store.cpp:22
KeyStore() noexcept
empty KeyStore
Definition key-store.cpp:7
void insecureAccessRequest(bool write) const
guard the insecure access attempts
Definition key-store.cpp:64
crypto::secret_key m_key
Definition key-store.hpp:80
void unlockInsecureOnce(bool writeable=false) const noexcept
unlock insecure access once to the stored bytes in crypto::secret_key and locks the insecure access d...
Definition key-store.cpp:50
void wipe() noexcept
secure wipe of the keystore
Definition key-store.cpp:104
void lockInsecure() const noexcept
locks insecure access complete
Definition key-store.cpp:57
static KeyStore transfer(uint8_t *key, size_t size)
moves 32 bytes into the KeyStore and wipes the insecure memory
Definition key-store.cpp:37
void unlockInsecure(bool writeable=false) const noexcept
unlock insecure access to the stored bytes in crypto::secret_key
Definition key-store.cpp:43
Represents a monero 13-words seed type for backward compatibility.
Definition ots.hpp:482
Represents a Monero 25-words seed.
Definition ots.hpp:558
Represents a Polyseed type.
Definition ots.hpp:706
The library exists complete only in this namespace.
Definition account.hpp:39