hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
crypto_provider.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_URSA_CRYPTOPROVIDER_HPP
7 #define IROHA_URSA_CRYPTOPROVIDER_HPP
8 
12 #include "cryptography/seed.hpp"
13 #include "cryptography/signed.hpp"
14 
15 namespace shared_model {
16  namespace crypto {
21  public:
28  static Signed sign(const Blob &blob, const Keypair &keypair);
29 
37  static bool verify(const Signed &signed_data,
38  const Blob &orig,
39  const PublicKey &public_key);
40 
45  static Keypair generateKeypair();
46 
52  static Keypair generateKeypair(const Seed &seed);
53 
54  static const size_t kHashLength;
55  static const size_t kPublicKeyLength;
56  static const size_t kPrivateKeyLength;
57  static const size_t kSignatureLength;
58  };
59  } // namespace crypto
60 } // namespace shared_model
61 
62 #endif // IROHA_URSA_CRYPTOPROVIDER_HPP
Definition: blob.hpp:25
static Keypair generateKeypair()
Definition: crypto_provider.cpp:63
Definition: keypair.hpp:19
static const size_t kSignatureLength
Definition: crypto_provider.hpp:57
Definition: seed.hpp:16
Definition: signed.hpp:17
Definition: crypto_provider.hpp:20
Definition: public_key.hpp:16
static const size_t kHashLength
Definition: crypto_provider.hpp:54
static Signed sign(const Blob &blob, const Keypair &keypair)
Definition: crypto_provider.cpp:12
Definition: command_executor.hpp:12
static bool verify(const Signed &signed_data, const Blob &orig, const PublicKey &public_key)
Definition: crypto_provider.cpp:38
static const size_t kPublicKeyLength
Definition: crypto_provider.hpp:55
static const size_t kPrivateKeyLength
Definition: crypto_provider.hpp:56