28 #ifndef CRYPTO_MODULE_HPP
29 #define CRYPTO_MODULE_HPP
31 #include "../my_config.h"
48 crypto_module(
const crypto_module & ref) =
default;
49 crypto_module(crypto_module && ref) noexcept =
default;
50 crypto_module & operator = (
const crypto_module & ref) =
default;
51 crypto_module & operator = (crypto_module && ref) noexcept =
default;
52 virtual ~crypto_module() noexcept = default;
61 virtual U_32 encrypted_block_size_for(U_32 clear_block_size) = 0;
71 virtual U_32 clear_block_allocated_size_for(U_32 clear_block_size) = 0;
83 virtual U_32 encrypt_data(const infinint & block_num,
84 const
char *clear_buf,
85 const U_32 clear_size,
86 const U_32 clear_allocated,
98 virtual U_32 decrypt_data(const infinint & block_num,
99 const
char *crypt_buf,
100 const U_32 crypt_size,
102 U_32 clear_size) = 0;
105 virtual std::unique_ptr<crypto_module> clone() const = 0;
switch module to limitint (32 ou 64 bits integers) or infinint
are defined here basic integer types that tend to be portable
libdar namespace encapsulate all libdar symbols