|
Offline Transaction Signing (OTS) 0.1.0
|
essentialy wraps crypto::secret_key More...
#include <key-store.hpp>

Public Member Functions | |
| ~KeyStore () noexcept | |
| Destroy KeyStore. | |
| KeyStore () noexcept | |
| empty KeyStore | |
| KeyStore (const std::array< uint8_t, 32 > &key) noexcept | |
| create KeyStore from byte array | |
| KeyStore (const uint8_t *key, size_t size) | |
| create KeyStore from byte pointer and size | |
| KeyStore (crypto::secret_key key) noexcept | |
| create a KeyStore by copying a crypto::secret_key into the KeyStore | |
| void | set (const std::array< uint8_t, 32 > &key) noexcept |
| set key from byte array | |
| void | set (const uint8_t *key, size_t size) |
| set key from byte pointer and size | |
| void | set (crypto::secret_key key) noexcept |
| copy key from crypto::secret_key | |
| void | wipe () noexcept |
| secure wipe of the keystore | |
Static Public Member Functions | |
| static KeyStore | transfer (uint8_t *key, size_t size) |
| moves 32 bytes into the KeyStore and wipes the insecure memory | |
Protected Member Functions | |
| void | unlockInsecure (bool writeable=false) const noexcept |
| unlock insecure access to the stored bytes in crypto::secret_key | |
| void | unlockInsecureOnce (bool writeable=false) const noexcept |
| unlock insecure access once to the stored bytes in crypto::secret_key and locks the insecure access directly after | |
| void | lockInsecure () const noexcept |
| locks insecure access complete | |
| operator crypto::secret_key & () | |
| access the underlying crypto::secret_key by reference | |
| operator const crypto::secret_key & () const | |
| Implicit conversion to const crypto::secret_key reference. | |
| operator const unsigned char * () const | |
| Implicit conversion to const unsigned char pointer for direct byte access. | |
| operator const char * () const | |
| Implicit conversion to const char pointer for direct byte access. | |
| operator std::array< unsigned char, 32 > () const | |
| Implicit conversion to std::array<unsigned char, 32> for direct byte access. | |
| void | insecureAccessRequest (bool write) const |
| guard the insecure access attempts | |
Protected Attributes | |
| crypto::secret_key | m_key |
Friends | |
| class | LegacySeed |
| class | MoneroSeed |
| class | Polyseed |
| class | Account |
essentialy wraps crypto::secret_key
|
noexcept |
Destroy KeyStore.
|
explicitnoexcept |
empty KeyStore
|
explicitnoexcept |
create KeyStore from byte array
|
explicit |
create KeyStore from byte pointer and size
| key | pointer to bytes |
| size | size of bytes, must be 32 or less, but should be always 32 |
| ots::exception::BufferOverflowException | if size > 32 |
|
explicitnoexcept |
|
protected |
guard the insecure access attempts
| ots::exception::keystore::LockedWriteAttempt | if not unlocked for write access, if write access is requested |
| ots::exception::keystore::LockedAccessAttempt | if not unlocked for access |
|
protectednoexcept |
locks insecure access complete
|
protected |
Implicit conversion to const char pointer for direct byte access.
| ots::exception::keystore::LockedAccessAttempt | if not unlocked for access |
Usage example:
|
protected |
Implicit conversion to const crypto::secret_key reference.
| ots::exception::keystore::LockedAccessAttempt | if not unlocked for access |
Usage example:
|
protected |
Implicit conversion to const unsigned char pointer for direct byte access.
| ots::exception::keystore::LockedAccessAttempt | if not unlocked for access |
Usage example:
|
explicitprotected |
access the underlying crypto::secret_key by reference
| ots::exception::keystore::LockedWriteAttempt | if not unlocked for write access. The reason behind is that with the crypto::secret_key object you are able to modify the data |
Usage example:
|
protected |
Implicit conversion to std::array<unsigned char, 32> for direct byte access.
| ots::exception::keystore::LockedAccessAttempt | if not unlocked for access |
Usage example:
|
noexcept |
set key from byte array
| void ots::KeyStore::set | ( | const uint8_t * | key, |
| size_t | size | ||
| ) |
set key from byte pointer and size
| key | pointer to bytes |
| size | size of bytes, must be 32 or less, but should be always 32 |
| ots::exception::BufferOverflowException | if size > 32 |
|
noexcept |
copy key from crypto::secret_key
|
static |
moves 32 bytes into the KeyStore and wipes the insecure memory
| key | the unsecured bytes pointer |
| size | size of bytes, must be 32 or less, but should be always 32 |
| ots::exception::BufferOverflowException | if size > 32 |
|
protectednoexcept |
unlock insecure access to the stored bytes in crypto::secret_key
| writeable | by default false, on true permits to write to the bytes |
|
protectednoexcept |
unlock insecure access once to the stored bytes in crypto::secret_key and locks the insecure access directly after
| writeable | by default false, on true permits to write to the bytes |
|
noexcept |
secure wipe of the keystore
|
friend |
|
friend |
|
friend |
|
friend |
|
protected |