6#ifndef CRYPTOPP_DEFAULT_H
7#define CRYPTOPP_DEFAULT_H
38 :
Exception(DATA_INTEGRITY_CHECK_FAILED, s) {}
45 :
DataDecryptorErr(
"DataDecryptor: cannot decrypt message with this passphrase") {}
56template <
unsigned int BlockSize,
unsigned int KeyLength,
unsigned int DigestSize,
unsigned int SaltSize,
unsigned int Iterations>
59 CRYPTOPP_CONSTANT(BLOCKSIZE = BlockSize);
60 CRYPTOPP_CONSTANT(KEYLENGTH = KeyLength);
61 CRYPTOPP_CONSTANT(SALTLENGTH = SaltSize);
62 CRYPTOPP_CONSTANT(DIGESTSIZE = DigestSize);
63 CRYPTOPP_CONSTANT(ITERATIONS = Iterations);
77template <
class BC,
class H,
class Info>
81 CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
82 CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
83 CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
84 CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
85 CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
99 void FirstPut(
const byte *);
100 void LastPut(
const byte *inString,
size_t length);
115template <
class BC,
class H,
class Info>
119 CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
120 CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
121 CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
122 CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
123 CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
138 enum State {WAITING_FOR_KEYCHECK, KEY_GOOD, KEY_BAD};
139 State CurrentState()
const {
return m_state;}
142 void FirstPut(
const byte *inString);
143 void LastPut(
const byte *inString,
size_t length);
148 void CheckKey(
const byte *salt,
const byte *keyCheck);
153 bool m_throwException;
172template <
class BC,
class H,
class MAC,
class Info>
176 CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
177 CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
178 CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
179 CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
180 CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
194 void FirstPut(
const byte *inString) {CRYPTOPP_UNUSED(inString);}
195 void LastPut(
const byte *inString,
size_t length);
217template <
class BC,
class H,
class MAC,
class Info>
221 CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
222 CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
223 CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
224 CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
225 CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
240 typename DataDecryptor<BC,H,Info>::State CurrentState()
const;
241 bool CheckLastMAC()
const;
244 void FirstPut(
const byte *inString) {CRYPTOPP_UNUSED(inString);}
245 void LastPut(
const byte *inString,
size_t length);
250 bool m_throwException;
253#if defined(CRYPTOPP_DOXYGEN_PROCESSING)
Class file for the AES cipher (Rijndael)
AES block cipher (Rijndael)
Block cipher mode of operation aggregate.
2-key TripleDES block cipher
Exception thrown when LegacyDecryptorWithMAC or DefaultDecryptorWithMAC decryption error is encounter...
Password-based Decryptor.
DataDecryptor(const char *passphrase, BufferedTransformation *attachment=NULL, bool throwException=true)
Constructs a DataDecryptor.
Password-based decryptor with MAC.
DataDecryptorWithMAC(const char *passphrase, BufferedTransformation *attachment=NULL, bool throwException=true)
Constructs a DataDecryptor.
Password-based Encryptor.
DataEncryptor(const char *passphrase, BufferedTransformation *attachment=NULL)
Construct a DataEncryptor.
Password-based encryptor with MAC.
DataEncryptorWithMAC(const char *passphrase, BufferedTransformation *attachment=NULL)
Constructs a DataEncryptorWithMAC.
Base class for all exceptions thrown by the library.
Filter wrapper for HashTransformation.
Exception thrown when a bad key is encountered in DefaultDecryptorWithMAC and LegacyDecryptorWithMAC.
Exception thrown when an incorrect MAC is encountered in DefaultDecryptorWithMAC and LegacyDecryptorW...
Base class for Filter classes that are proxies for a chain of other filters.
Pointer that overloads operator ->
Classes for DES, 2-key Triple-DES, 3-key Triple-DES and DESX.
Implementation of BufferedTransformation's attachment interface.
Classes for HMAC message authentication codes.
Classes for block cipher modes of operation.
Crypto++ library namespace.
Classes for SHA-1 and SHA-2 family of message digests.
Classes for automatic resource management.
Algorithm information for password-based encryptors and decryptors.
Password-based decryptor.
Password-based decryptor with MAC.
Password-based encryptor.
Password-based encryptor with MAC.
Password-based decryptor (deprecated)
Password-based decryptor with MAC (deprecated)
Password-based encryptor (deprecated)
Password-based encryptor with MAC (deprecated)