Kagome
Polkadot Runtime Engine in C++17
pbkdf2_provider.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CRYPTO_PBKDF2_PROVIDER_HPP
7 #define KAGOME_CRYPTO_PBKDF2_PROVIDER_HPP
8 
9 #include <gsl/span>
10 #include "common/buffer.hpp"
11 #include "outcome/outcome.hpp"
12 
13 namespace kagome::crypto {
14 
16 
21  public:
22  virtual ~Pbkdf2Provider() = default;
23 
32  virtual outcome::result<common::Buffer> deriveKey(
33  gsl::span<const uint8_t> data,
34  gsl::span<const uint8_t> salt,
35  size_t iterations,
36  size_t key_length) const = 0;
37  };
38 } // namespace kagome::crypto
39 
41 
42 #endif // KAGOME_CRYPTO_PBKDF2_PROVIDER_HPP
OUTCOME_HPP_DECLARE_ERROR(kagome::crypto, Pbkdf2ProviderError)