CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace crypto {
29 void Sign(
const KeyPair& keyPair,
const RawBuffer& dataBuffer, Signature& computedSignature);
33 void Sign(
const KeyPair& keyPair, std::initializer_list<const RawBuffer> buffersList, Signature& computedSignature);
37 bool Verify(
const Key& publicKey,
const RawBuffer& dataBuffer,
const Signature& signature);
41 bool Verify(
const Key& publicKey, std::initializer_list<const RawBuffer> buffersList,
const Signature& signature);
KeccakBuilder< KeccakModeTag, Hash512_tag > Keccak_512_Builder
Keccak_512_Builder.
Definition: Hashes.h:97
model::AccountAddressNotification Notification
Definition: AddressValidator.cpp:27
#define RESTRICT
Definition: Signer.cpp:36
constexpr size_t Hash512_Size
Definition: src/catapult/types.h:33
constexpr size_t Signature_Size
Definition: src/catapult/types.h:31
#define CATAPULT_THROW_OUT_OF_RANGE(MESSAGE)
Macro used to throw a catapult out of range.
Definition: exceptions.h:191
constexpr const uint8_t * data() const noexcept
Returns a const pointer to the underlying array.
Definition: ByteArray.h:70
for(const auto &name :reservedRootNamespaceNames) reservedRootIds.emplace(model return MAKE_STATELESS_VALIDATOR(NamespaceName,([maxNameSize, reservedRootIds](const auto ¬ification) { if(maxNameSize< notification.NameSize||!model::IsValidName(notification.NamePtr, notification.NameSize)) return Failure_Namespace_Invalid_Name;auto name=utils::RawString(reinterpret_cast< const char * >(notification.NamePtr), notification.NameSize);if(notification.NamespaceId !=model::GenerateNamespaceId(notification.ParentId, name)) return Failure_Namespace_Name_Id_Mismatch;auto namespaceId=Namespace_Base_Id==notification.ParentId ? notification.NamespaceId :notification.ParentId;if(reservedRootIds.cend() !=reservedRootIds.find(namespaceId)) return Failure_Namespace_Root_Name_Reserved;return ValidationResult::Success;}))
Definition: NamespaceNameValidator.cpp:36
void HashPrivateKey(const PrivateKey &privateKey, Hash512 &hash)
Calculates hash of a privateKey.
Definition: CryptoUtils.cpp:31
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
const auto & privateKey() const
Returns a private key of a key pair.
Definition: KeyPair.h:51
const auto & publicKey() const
Returns a public key of a key pair.
Definition: KeyPair.h:56
DECLARE_STATELESS_VALIDATOR(MaxTransactions, Notification)(uint32_t maxTransactions)
Definition: MaxTransactionsValidator.cpp:27
Definition: AddressExtractionExtension.cpp:28
Notification of use of an account address.
Definition: Notifications.h:57
bool Verify(const Key &publicKey, const RawBuffer &dataBuffer, const Signature &signature)
Definition: Signer.cpp:136
Base class for wrappers of byte array types, to provide some type-safety.
Definition: ByteArray.h:29
KeccakBuilder< Sha3ModeTag, Hash512_tag > Sha3_512_Builder
Sha3_512_Builder.
Definition: Hashes.h:89
void Sign(const KeyPair &keyPair, const RawBuffer &dataBuffer, Signature &computedSignature)
Definition: Signer.cpp:82
utils::ByteArray< Key_Size, Key_tag > Key
Definition: src/catapult/types.h:41
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62