author | Michael Krelin <hacker@klever.net> | 2009-04-05 13:32:09 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2009-04-05 13:32:09 (UTC) |
commit | 878315238f71307b5b62ed314096f4a7c465bf3e (patch) (unidiff) | |
tree | dad1579d95b1f7189dc6be5cbd66c36cf340cb94 /src/eyetil.h | |
parent | 01eedb36de69f92fc896c525047df78b34f87324 (diff) | |
download | iii-878315238f71307b5b62ed314096f4a7c465bf3e.zip iii-878315238f71307b5b62ed314096f4a7c465bf3e.tar.gz iii-878315238f71307b5b62ed314096f4a7c465bf3e.tar.bz2 |
integrity digest calculation
implemented integrity digest calculation for uploaded files,
thanks to cdavies of eye-fi forums.
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | src/eyetil.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eyetil.h b/src/eyetil.h index 195d24f..378f703 100644 --- a/src/eyetil.h +++ b/src/eyetil.h | |||
@@ -24,25 +24,28 @@ class tmpdir_t { | |||
24 | public: | 24 | public: |
25 | std::string dir; | 25 | std::string dir; |
26 | 26 | ||
27 | tmpdir_t(const std::string& dt); | 27 | tmpdir_t(const std::string& dt); |
28 | ~tmpdir_t(); | 28 | ~tmpdir_t(); |
29 | 29 | ||
30 | std::string get_file(const std::string& f); | 30 | std::string get_file(const std::string& f); |
31 | }; | 31 | }; |
32 | 32 | ||
33 | class tarchive_t { | 33 | class tarchive_t { |
34 | public: | 34 | public: |
35 | struct archive *a; | 35 | struct archive *a; |
36 | struct archive_entry *e; | 36 | struct archive_entry *e; |
37 | 37 | ||
38 | tarchive_t(void *p,size_t s); | 38 | tarchive_t(void *p,size_t s); |
39 | ~tarchive_t(); | 39 | ~tarchive_t(); |
40 | 40 | ||
41 | bool read_next_header(); | 41 | bool read_next_header(); |
42 | 42 | ||
43 | std::string entry_pathname(); | 43 | std::string entry_pathname(); |
44 | 44 | ||
45 | bool read_data_into_fd(int fd); | 45 | bool read_data_into_fd(int fd); |
46 | }; | 46 | }; |
47 | 47 | ||
48 | binary_t integrity_digest(const void *ptr,size_t size, | ||
49 | const std::string& ukey); | ||
50 | |||
48 | #endif /* __EYETIL_H */ | 51 | #endif /* __EYETIL_H */ |