CatapultServer  v0.5.0.1 (Elephant)
TransactionExtensions.h
Go to the documentation of this file.
1 
21 #pragma once
23 
24 namespace catapult { namespace extensions {
25 
28  public:
30  explicit TransactionExtensions(const GenerationHash& generationHash);
31 
32  public:
34  void sign(const crypto::KeyPair& signer, model::Transaction& transaction) const;
35 
37  bool verify(const model::Transaction& transaction) const;
38 
39  private:
41  };
42 }}
Transaction.h
TransactionExtensions.h
catapult::model::VerifiableEntityHeader::Header_Size
static constexpr size_t Header_Size
Size of the VerifiableEntity part that can be skipped when signing/verifying.
Definition: VerifiableEntity.h:38
KeyPair.h
catapult::extensions::TransactionExtensions
Extensions for working with transactions.
Definition: TransactionExtensions.h:27
catapult::crypto::KeyPair
Represents a pair of private key with associated public key.
Definition: KeyPair.h:33
catapult::extensions::TransactionExtensions::TransactionExtensions
TransactionExtensions(const GenerationHash &generationHash)
Creates extensions for transactions for the network with the specified generation hash (generationHas...
Definition: TransactionExtensions.cpp:36
Signer.h
catapult::model::EntityBody::Signer
Key Signer
Entity signer's public key.
Definition: EntityBody.h:36
catapult::model::VerifiableEntityHeader::Signature
catapult::Signature Signature
Entity signature.
Definition: VerifiableEntity.h:41
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::crypto::Verify
bool Verify(const Key &publicKey, const RawBuffer &dataBuffer, const Signature &signature)
Definition: Signer.cpp:136
catapult::extensions::TransactionExtensions::m_generationHash
GenerationHash m_generationHash
Definition: TransactionExtensions.h:40
catapult::extensions::TransactionExtensions::sign
void sign(const crypto::KeyPair &signer, model::Transaction &transaction) const
Signs the transaction using signer private key.
Definition: TransactionExtensions.cpp:39
m_generationHash
GenerationHash m_generationHash
Definition: HashCalculatorConsumer.cpp:67
catapult::utils::ByteArray< Hash256_Size, GenerationHash_tag >
catapult::extensions::TransactionExtensions::verify
bool verify(const model::Transaction &transaction) const
Verifies signature of the transaction.
Definition: TransactionExtensions.cpp:43
catapult::crypto::Sign
void Sign(const KeyPair &keyPair, const RawBuffer &dataBuffer, Signature &computedSignature)
Definition: Signer.cpp:82
catapult::utils::RawBuffer
BasicRawBuffer< const uint8_t > RawBuffer
A const binary buffer.
Definition: RawBuffer.h:62
catapult::model::Transaction
Binary layout for a transaction.
Definition: Transaction.h:32