33 #ifndef HASH_FICHIER_HPP
34 #define HASH_FICHIER_HPP
36 #include "../my_config.h"
65 extern std::string hash_algo_to_string(
hash_algo algo);
67 class hash_fichier :
public fichier
73 hash_fichier(user_interaction & dialog, S_I fd);
74 hash_fichier(user_interaction & dialog,
const char *name,
gf_mode m, U_I perm,
bool furtive_mode =
false);
75 hash_fichier(user_interaction & dialog,
const std::string & chemin,
gf_mode m, U_I perm,
bool furtive_mode =
false);
76 hash_fichier(
const std::string & chemin,
bool furtive_mode =
false) : fichier(chemin, furtive_mode) {
throw SRC_BUG; };
77 hash_fichier(
const hash_fichier & ref) : fichier(ref) {
throw SRC_BUG; };
80 const hash_fichier & operator = (
const hash_fichier & ref) {
throw SRC_BUG; };
94 void set_hash_file_name(
const std::string & filename,
hash_algo algo,
const std::string & extension);
97 void change_permission(U_I perm) { x_perm = perm; fichier::change_permission(perm); };
98 void change_ownership(
const std::string & user,
const std::string & group) { user_ownership = user; group_ownership = group; fichier::change_ownership(user, group); };
102 bool skip(
const infinint & pos) {
if(pos != fichier::get_position())
throw SRC_BUG;
else return true; };
103 bool skip_to_eof() {
throw SRC_BUG; };
104 bool skip_relative(S_I x) {
if(x != 0)
throw SRC_BUG;
else return true; };
108 U_I inherited_read(
char *a, U_I size) {
throw SRC_BUG; };
109 void inherited_write(
const char *a, U_I size);
111 void inherited_terminate();
115 std::string hash_filename;
116 std::string hash_extension;
118 std::string user_ownership;
119 std::string group_ownership;
121 gcry_md_hd_t hash_handle;