File: file.h

package info (click to toggle)
rsyncrypto 1.12-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 1,312 kB
  • ctags: 576
  • sloc: sh: 3,958; cpp: 3,253; makefile: 70
file content (23 lines) | stat: -rw-r--r-- 1,122 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef FILE_H
#define FILE_H

// Function types for processing files
typedef void (* encryptfunc)(const char *source, const char *dest, const char *key, RSA *rsa,
    const struct stat *stat );
typedef std::string(* namefunc)(const char *left, const char *right, mode_t mode );

// A simple concatanation of both names
std::string name_concat( const char *left, const char *right, mode_t mode );

void filelist_encrypt( const char *src_dir, const char *dst_dir, const char *key_dir, RSA *rsa_key,
        encryptfunc op, const char *opname, namefunc srcnameop, namefunc dstnameop, namefunc keynameop );
void dir_encrypt( const char *src_dir, const char *dst_dir, const char *key_dir, RSA *rsa_key,
        encryptfunc op, const char *opname, namefunc dstname, namefunc keyname );
void file_encrypt( const char *source_file, const char *dst_file, const char *key_file,
        RSA *rsa_key, const struct stat *stat );
void file_decrypt( const char *src_file, const char *dst_file, const char *key_file, RSA *rsa_key,
        const struct stat *stat );

int calc_trim( const char *path, int trim_count );

#endif // FILE_H