26 #ifndef CRYPTO_SYM_HPP 27 #define CRYPTO_SYM_HPP 32 #ifndef GCRYPT_NO_DEPRECATED 33 #define GCRYPT_NO_DEPRECATED 39 #include "../my_config.h" 52 inline bool crypto_min_ver_libgcrypt_no_bug()
55 return gcry_check_version(MIN_VERSION_GCRYPT_HASH_BUG);
69 bool no_initial_shift,
88 const char *clear_buf,
const U_32 clear_size,
const U_32 clear_allocated,
89 char *crypt_buf, U_32 crypt_size);
91 const char *crypt_buf,
const U_32 crypt_size,
92 char *clear_buf, U_32 clear_size);
96 gcry_cipher_hd_t clef;
97 gcry_cipher_hd_t essiv_clef;
99 size_t algo_block_size;
111 gcry_cipher_hd_t & IVkey,
121 static void make_ivec(
const infinint & ref,
124 const gcry_cipher_hd_t & IVkey);
128 const std::string & salt,
136 #ifdef LIBDAR_NO_OPTIMIZATION 137 static void self_test(
void);
this is a partial implementation of the generic_file interface to cypher/decypher data block by block...
static bool is_a_strong_password(crypto_algo algo, const secu_string &password)
check whether the given password is reported as strong in regard to the given cipher ...
the crypto algoritm definition
static size_t max_key_len_libdar(crypto_algo algo)
returns the max key length in octets to use to compute a key from a user provided password ...
static size_t max_key_len(crypto_algo algo)
returns the max key length in octets for the given algorithm
U_32 encrypted_block_size_for(U_32 clear_block_size)
defines the size necessary to encrypt a given amount of clear data
this is the interface class from which all other data transfer classes inherit
U_32 decrypt_data(const infinint &block_num, const char *crypt_buf, const U_32 crypt_size, char *clear_buf, U_32 clear_size)
this method decyphers data
U_32 clear_block_allocated_size_for(U_32 clear_block_size)
it may be necessary by the inherited class have few more bytes allocated after the clear data given f...
defines a block structured file.Mainly used for strong encryption.
the arbitrary large positive integer class
U_32 encrypt_data(const infinint &block_num, const char *clear_buf, const U_32 clear_size, const U_32 clear_allocated, char *crypt_buf, U_32 crypt_size)
this method encrypts the clear data given
this file contains the definition of secu_string class, a std::string like class but allocated in sec...
libdar namespace encapsulate all libdar symbols