hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
crypto_signer.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CRYPTO_SIGNER_HPP
7 #define IROHA_CRYPTO_SIGNER_HPP
8 
9 #include "cryptography/blob.hpp"
11 #include "cryptography/keypair.hpp"
12 #include "cryptography/signed.hpp"
13 
14 namespace shared_model {
15  namespace crypto {
21  template <typename Algorithm = DefaultCryptoAlgorithmType>
22  class CryptoSigner {
23  public:
30  static Signed sign(const Blob &blob, const Keypair &keypair) {
31  return Algorithm::sign(blob, keypair);
32  }
33 
35  CryptoSigner() = delete;
36  };
37  } // namespace crypto
38 } // namespace shared_model
39 #endif // IROHA_CRYPTO_SIGNER_HPP
Definition: blob.hpp:24
Definition: keypair.hpp:19
static Signed sign(const Blob &blob, const Keypair &keypair)
Definition: crypto_signer.hpp:30
Definition: crypto_signer.hpp:22
sig_t sign(const uint8_t *msg, size_t msgsize, const pubkey_t &pub, const privkey_t &priv)
Definition: ed25519_impl.cpp:16
CryptoSigner()=delete
close constructor for forbidding instantiation
Definition: signed.hpp:17
Definition: command_executor.hpp:12