37 #ifndef VIRGIL_CRYPTO_PBKDF_H
38 #define VIRGIL_CRYPTO_PBKDF_H
43 #include <virgil/crypto/VirgilByteArray.h>
44 #include <virgil/crypto/foundation/VirgilHash.h>
45 #include <virgil/crypto/foundation/asn1/VirgilAsn1Compatible.h>
47 namespace virgil {
namespace crypto {
namespace foundation {
193 std::unique_ptr<Impl> impl_;
Algorithm
Defines specific password based key derivation function algorithm.
Definition: VirgilPBKDF.h:63
unsigned int getIterationCount() const
Return iteration count.
Algorithm
Enumerates possible Hash algorithms.
Definition: VirgilHash.h:57
virgil::crypto::VirgilByteArray derive(const virgil::crypto::VirgilByteArray &pwd, size_t outSize=0)
Derive key from the given key material.
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
VirgilByteArray getSalt() const
Return salt.
void disableRecommendationsCheck()
Ignore security check for used parameters.
static constexpr unsigned int kIterationCount_Default
Default iteration count.
Definition: VirgilPBKDF.h:58
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
void asn1Read(asn1::VirgilAsn1Reader &asn1Reader) override
Read object state from the reader.
void setHashAlgorithm(VirgilHash::Algorithm hash)
Set underlying digest algorithm.
Definition: VirgilHash.h:252
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
Root namespace for all Virgil Security libraries.
Definition: VirgilAsn1Compatible.h:46
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:53
VirgilPBKDF::Algorithm getAlgorithm() const
Return current algorithm of the password based key derivation function.
void setAlgorithm(VirgilPBKDF::Algorithm alg)
Set specific algorithm of the password based key derivation function.
VirgilPBKDF()
Create object with undefined algorithms.
Defines PBKDF2 algorithm (https://www.ietf.org/rfc/rfc2898.txt)
void enableRecommendationsCheck()
Involve security check for used parameters.
VirgilHash::Algorithm getHashAlgorithm() const
Returns underlying digest algorithm.
Provides password based key derivation function.
Definition: VirgilPBKDF.h:52
size_t asn1Write(asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const override
Write object state to the writer.