hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
crypto_provider.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CRYPTOPROVIDER_HPP
7 #define IROHA_CRYPTOPROVIDER_HPP
8 
10 #include "cryptography/seed.hpp"
11 #include "cryptography/signed.hpp"
12 
13 namespace shared_model {
14  namespace crypto {
19  public:
26  static Signed sign(const Blob &blob, const Keypair &keypair);
27 
35  static bool verify(const Signed &signedData,
36  const Blob &orig,
37  const PublicKey &publicKey);
42  static Seed generateSeed();
43 
49  static Seed generateSeed(const std::string &passphrase);
50 
55  static Keypair generateKeypair();
56 
62  static Keypair generateKeypair(const Seed &seed);
63 
64  static const size_t kHashLength;
65  static const size_t kPublicKeyLength;
66  static const size_t kPrivateKeyLength;
67  static const size_t kSignatureLength;
68  static const size_t kSeedLength;
69  };
70  } // namespace crypto
71 } // namespace shared_model
72 
73 #endif // IROHA_CRYPTOPROVIDER_HPP
static Keypair generateKeypair()
Definition: crypto_provider.cpp:34
static const size_t kPrivateKeyLength
Definition: crypto_provider.hpp:66
static Signed sign(const Blob &blob, const Keypair &keypair)
Definition: crypto_provider.cpp:14
Definition: blob.hpp:24
static const size_t kSeedLength
Definition: crypto_provider.hpp:68
Definition: keypair.hpp:19
static const size_t kHashLength
Definition: crypto_provider.hpp:64
static const size_t kSignatureLength
Definition: crypto_provider.hpp:67
Definition: seed.hpp:16
Definition: signed.hpp:17
static Seed generateSeed()
Definition: crypto_provider.cpp:25
static const size_t kPublicKeyLength
Definition: crypto_provider.hpp:65
static bool verify(const Signed &signedData, const Blob &orig, const PublicKey &publicKey)
Definition: crypto_provider.cpp:19
Definition: crypto_provider.hpp:18
Definition: public_key.hpp:16
Definition: command_executor.hpp:12