37 #ifndef VIRGIL_CRYPTO_VIRGIL_PBE_H
38 #define VIRGIL_CRYPTO_VIRGIL_PBE_H
43 #include "../VirgilByteArray.h"
44 #include "asn1/VirgilAsn1Compatible.h"
46 namespace virgil {
namespace crypto {
namespace foundation {
147 void checkState() const;
159 std::unique_ptr<Impl> impl_;
Algorithm
Enumerates possible Password Based Encryption algorithms.
Definition: VirgilPBE.h:57
This class provides methods for reading ASN.1 data structure.
Definition: VirgilAsn1Reader.h:53
Provides Password-Based Cryptography. Now PKCS#5 and PKCS#12 are partially supported.
Definition: VirgilPBE.h:52
This class provides interface that allow to save and restore object state in the ASN.1 structure.
Definition: VirgilAsn1Compatible.h:59
This class provides methods for writing ASN.1 data structure.
Definition: VirgilAsn1Writer.h:54
static constexpr size_t kIterationCountMin
Recommended iteration count that is used for key derivation.
Definition: VirgilPBE.h:70
std::vector< unsigned char > VirgilByteArray
This type represents a sequence of bytes.
Definition: VirgilByteArray.h:50
void asn1Read(asn1::VirgilAsn1Reader &asn1Reader) override
Read object state from the reader.
VirgilPBE()
Create object with undefined algorithm.
virgil::crypto::VirgilByteArray encrypt(const virgil::crypto::VirgilByteArray &data, const virgil::crypto::VirgilByteArray &pwd) const
Encrypt data with given password.
PBE Algorithm: from the standard PKCS#12.
PBE Algorithm: from the standard PKCS#5.
virgil::crypto::VirgilByteArray decrypt(const virgil::crypto::VirgilByteArray &data, const virgil::crypto::VirgilByteArray &pwd) const
Decrypt data with given password.
size_t asn1Write(asn1::VirgilAsn1Writer &asn1Writer, size_t childWrittenBytes=0) const override
Write object state to the writer.