Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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
15
enum class
Pbkdf2ProviderError
{
KEY_DERIVATION_FAILED
= 1 };
16
20
class
Pbkdf2Provider
{
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
40
OUTCOME_HPP_DECLARE_ERROR
(
kagome::crypto
,
Pbkdf2ProviderError
);
41
42
#endif // KAGOME_CRYPTO_PBKDF2_PROVIDER_HPP
kagome::crypto::Pbkdf2ProviderError
Pbkdf2ProviderError
Definition:
pbkdf2_provider.hpp:15
kagome::crypto::Pbkdf2Provider
Definition:
pbkdf2_provider.hpp:20
outcome.hpp
kagome::crypto::Pbkdf2ProviderError::KEY_DERIVATION_FAILED
buffer.hpp
kagome::crypto
Definition:
author_api_impl.hpp:31
OUTCOME_HPP_DECLARE_ERROR
OUTCOME_HPP_DECLARE_ERROR(kagome::crypto, Pbkdf2ProviderError)
core
crypto
pbkdf2
pbkdf2_provider.hpp
Generated by
1.8.11