CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace crypto {
28 #pragma pack(push, 16)
64 inline auto end()
const {
constexpr auto cbegin() const noexcept
Returns a const iterator to the first byte.
Definition: ByteArray.h:81
constexpr size_t size() const
Returns the array size.
Definition: ByteArray.h:55
auto begin() const
Returns a const iterator to the beginning of the raw key.
Definition: PrivateKey.h:59
bool operator==(const PrivateKey &rhs) const
Returns true if this key and rhs are equal.
Definition: PrivateKey.cpp:83
PrivateKey & operator=(PrivateKey &&rhs)
Move assignment operator.
Definition: PrivateKey.cpp:52
Represents a private key.
Definition: PrivateKey.h:32
static PrivateKey Generate(const supplier< uint8_t > &generator)
Generates a new private key using the specified byte generator.
Definition: PrivateKey.cpp:77
static PrivateKey FromString(const std::string &str)
Creates a private key from str.
Definition: PrivateKey.cpp:68
std::function< T()> supplier
A (stateless) supplier function.
Definition: functions.h:39
Key m_key
Definition: PrivateKey.h:89
auto data() const
Returns a const pointer to the raw key.
Definition: PrivateKey.h:74
void SecureZero(Key &key)
Securely zeros out the memory backing the specified key.
Definition: SecureZero.cpp:42
constexpr const uint8_t * data() const noexcept
Returns a const pointer to the underlying array.
Definition: ByteArray.h:70
PrivateKey()=default
Creates a private key.
constexpr auto begin() const noexcept
Returns a const iterator to the first byte.
Definition: ByteArray.h:91
uint64_t size
Definition: MemoryCounters.cpp:65
auto end() const
Returns a const iterator to the end of the raw key.
Definition: PrivateKey.h:64
auto size() const
Returns the size of the key.
Definition: PrivateKey.h:69
void ParseHexStringIntoContainer(const char *const pHexData, size_t dataSize, TContainer &outputContainer)
Parses a hex string (pHexData with size dataSize) into outputContainer.
Definition: HexParser.h:49
Definition: AddressExtractionExtension.cpp:28
size_t m_dataSize
Definition: PrivateKey.cpp:43
constexpr auto cend() const noexcept
Returns a const iterator to one past the last byte.
Definition: ByteArray.h:86
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
uint8_t * m_pData
Definition: PrivateKey.cpp:42
~PrivateKey()
Destroys the private key.
Definition: PrivateKey.cpp:58
bool operator!=(const PrivateKey &rhs) const
Returns true if this key and rhs are not equal.
Definition: PrivateKey.cpp:87
static PrivateKey FromStringSecure(char *pRawKey, size_t keySize)
Creates a private key from pRawKey with size keySize and securely erases pRawKey.
Definition: PrivateKey.cpp:72