CatapultServer  v0.5.0.1 (Elephant)
ToolKeys.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include "catapult/model/Address.h"
24 #include <vector>
25 
26 namespace catapult { namespace tools {
27 
29  crypto::KeyPair LoadServerKeyPair();
30 
32  crypto::KeyPair GenerateRandomKeyPair();
33 
35  std::vector<Address> PrepareAddresses(size_t count);
36 }}
catapult::Hash256
utils::ByteArray< Hash256_Size, Hash256_tag > Hash256
Definition: src/catapult/types.h:47
catapult::crypto::Sha3_256
void Sha3_256(const RawBuffer &dataBuffer, Hash256 &hash) noexcept
Calculates the 256-bit SHA3 hash of dataBuffer into hash.
Definition: Hashes.cpp:81
catapult::tools::RandomByte
uint8_t RandomByte()
Generates a uint8_t random number.
Definition: Random.cpp:47
catapult::crypto::KeyPair::FromPrivate
static auto FromPrivate(PrivateKey &&privateKey)
Creates a key pair from privateKey.
Definition: KeyPair.h:41
catapult::crypto::PrivateKey::Generate
static PrivateKey Generate(const supplier< uint8_t > &generator)
Generates a new private key using the specified byte generator.
Definition: PrivateKey.cpp:77
KeyPair.h
ToolKeys.h
Hashes.h
catapult::crypto::KeyPair
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
Address.h
catapult::model::PublicKeyToAddress
Address PublicKeyToAddress(const Key &publicKey, NetworkIdentifier networkIdentifier)
Creates an address from a public key (publicKey) for the network identified by networkIdentifier.
Definition: Address.cpp:50
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::tools::LoadServerKeyPair
crypto::KeyPair LoadServerKeyPair()
Returns server key pair used by tools.
Definition: ToolKeys.cpp:46
catapult::crypto::KeyPair::FromString
static auto FromString(const std::string &privateKey)
Creates a key pair from privateKey.
Definition: KeyPair.h:46
catapult::tools::PrepareAddresses
std::vector< Address > PrepareAddresses(size_t count)
Generate count deterministic addresses.
Definition: ToolKeys.cpp:54
catapult::Key
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
catapult::tools::GenerateRandomKeyPair
crypto::KeyPair GenerateRandomKeyPair()
Returns random key pair.
Definition: ToolKeys.cpp:50