37 #ifndef VIRGIL_CRYPTO_KDF_H
38 #define VIRGIL_CRYPTO_KDF_H
42 #include <virgil/crypto/VirgilByteArray.h>
43 #include <virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h>
45 namespace virgil {
namespace crypto {
namespace foundation {
102 std::string
name()
const;
115 virgil::crypto::VirgilByteArray
derive(
const virgil::crypto::VirgilByteArray& in,
size_t outSize);
153 size_t childWrittenBytes = 0)
const;
158 explicit VirgilKDF(
int kdfType,
int mdType);
163 void checkState()
const;
166 VirgilKDFImpl* impl_;
static VirgilKDF kdf1()
Configures with KDF1 (ISO-18033-2) algorithm.
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
std::string name() const
Returns name of the key derivation function.
Provides key derivation function algorithms.
Definition: VirgilKDF.h:57
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
static VirgilKDF kdf2()
Configures with KDF1 (ISO-18033-2) algorithm.
virtual void asn1Read(virgil::crypto::foundation::asn1::VirgilAsn1Reader &asn1Reader)
Read object state from the reader.
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
Definition: VirgilAsn1Compatible.h:46
VirgilKDF()
Create object with undefined algorithm.
virtual ~VirgilKDF()
Polymorphic destructor.
virtual size_t asn1Write(virgil::crypto::foundation::asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const
Write object state to the writer.
virgil::crypto::VirgilByteArray derive(const virgil::crypto::VirgilByteArray &in, size_t outSize)
Derive key from the given key material.