![]() |
Disk ARchive
2.7.3
Full featured and portable backup and archiving tool
|
symetrical strong encryption, interface to grypt library More...
#include <crypto_sym.hpp>
Inherits libdar::crypto_module.
Public Member Functions | |
| crypto_sym (const secu_string &password, const archive_version &reading_ver, crypto_algo algo, const std::string &salt, const infinint &iteration_count, hash_algo kdf_hash, bool use_pkcs5) | |
| crypto_sym (const crypto_sym &ref) | |
| crypto_sym (crypto_sym &&ref) noexcept | |
| crypto_sym & | operator= (const crypto_sym &ref) |
| crypto_sym & | operator= (crypto_sym &&ref) noexcept |
| virtual U_32 | encrypted_block_size_for (U_32 clear_block_size) override |
| virtual U_32 | clear_block_allocated_size_for (U_32 clear_block_size) override |
| virtual 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) override |
| virtual U_32 | decrypt_data (const infinint &block_num, const char *crypt_buf, const U_32 crypt_size, char *clear_buf, U_32 clear_size) override |
| virtual std::unique_ptr< crypto_module > | clone () const override |
| const std::string & | get_salt () const |
| give access to the calculated or provided salt | |
Static Public Member Functions | |
| static size_t | max_key_len (crypto_algo algo) |
| returns the max key length in octets for the given algorithm | |
| 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 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 | |
Private Member Functions | |
| void | detruit () |
| void | copy_from (const crypto_sym &ref) |
| void | move_from (crypto_sym &&ref) |
Private Attributes | |
| std::string | sel |
| the salt | |
symetrical strong encryption, interface to grypt library
Definition at line 66 of file crypto_sym.hpp.
| libdar::crypto_sym::crypto_sym | ( | const secu_string & | password, |
| const archive_version & | reading_ver, | ||
| crypto_algo | algo, | ||
| const std::string & | salt, | ||
| const infinint & | iteration_count, | ||
| hash_algo | kdf_hash, | ||
| bool | use_pkcs5 | ||
| ) |
| password | cipher password |
| reading_ver | archive format version |
| algo | ciphering algorithm to use |
| salt | if set empty, the salt is generated by the crypto_sym when use_pkcs5 is set to true, else it is not used |
| iteration_count | not used if use_pkcs5 is not set |
| kdf_hash | not used if use_pkcs5 is not set |
| use_pkcs5 | must be set to true when password is human defined to add a key derivation |