CatapultServer  v0.5.0.1 (Elephant)
KeyUtils.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/types.h"
24 
25 namespace catapult { namespace crypto { class PrivateKey; } }
26 
27 namespace catapult { namespace crypto {
28 
30  utils::ContainerHexFormatter<Key::const_iterator> FormatKey(const Key& key);
31 
33  utils::ContainerHexFormatter<Key::const_iterator> FormatKey(const PrivateKey& key);
34 
36  Key ParseKey(const std::string& keyString);
37 
39  bool IsValidKeyString(const std::string& str);
40 }}
catapult::utils::ByteArray::cbegin
constexpr auto cbegin() const noexcept
Returns a const iterator to the first byte.
Definition: ByteArray.h:81
PrivateKey.h
catapult::utils::HexFormat
constexpr void HexFormat(const ByteArray< N, TTag > &)
catapult::crypto::PrivateKey::begin
auto begin() const
Returns a const iterator to the beginning of the raw key.
Definition: PrivateKey.h:59
catapult::crypto::PrivateKey
Represents a private key.
Definition: PrivateKey.h:32
HexFormatter.h
catapult::crypto::FormatKey
utils::ContainerHexFormatter< Key::const_iterator > FormatKey(const Key &key)
Formats a public key for printing.
Definition: KeyUtils.cpp:27
catapult::utils::ContainerHexFormatter
Formatter for printing a container of integral hex numbers to a stream.
Definition: HexFormatter.h:89
catapult::crypto::ParseKey
Key ParseKey(const std::string &keyString)
Parses a key from a string (keyString) and returns the result.
Definition: KeyUtils.cpp:35
catapult::crypto::PrivateKey::end
auto end() const
Returns a const iterator to the end of the raw key.
Definition: PrivateKey.h:64
KeyUtils.h
catapult::crypto::IsValidKeyString
bool IsValidKeyString(const std::string &str)
Returns true if str represents a valid public key, false otherwise.
Definition: KeyUtils.cpp:39
types.h
catapult::utils::TryParseHexStringIntoContainer
bool TryParseHexStringIntoContainer(const char *const pHexData, size_t dataSize, TContainer &outputContainer)
Tries to parse a hex string (pHexData with size dataSize) into outputContainer.
Definition: HexParser.h:35
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Key_Size, Key_tag >
HexParser.h
catapult::utils::ByteArray::cend
constexpr auto cend() const noexcept
Returns a const iterator to one past the last byte.
Definition: ByteArray.h:86
catapult::Key
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41