xref: /dragonfly/contrib/cryptsetup/luks/af.h (revision 86d7f5d3)
1*86d7f5d3SJohn Marino #ifndef INCLUDED_CRYPTSETUP_LUKS_AF_H
2*86d7f5d3SJohn Marino #define INCLUDED_CRYPTSETUP_LUKS_AF_H
3*86d7f5d3SJohn Marino 
4*86d7f5d3SJohn Marino /*
5*86d7f5d3SJohn Marino  * AFsplitter - Anti forensic information splitter
6*86d7f5d3SJohn Marino  * Copyright 2004, Clemens Fruhwirth <clemens@endorphin.org>
7*86d7f5d3SJohn Marino  */
8*86d7f5d3SJohn Marino 
9*86d7f5d3SJohn Marino /*
10*86d7f5d3SJohn Marino  * AF_split operates on src and produces information splitted data in
11*86d7f5d3SJohn Marino  * dst. src is assumed to be of the length blocksize. The data stripe
12*86d7f5d3SJohn Marino  * dst points to must be captable of storing blocksize*blocknumbers.
13*86d7f5d3SJohn Marino  * blocknumbers is the data multiplication factor.
14*86d7f5d3SJohn Marino  *
15*86d7f5d3SJohn Marino  * AF_merge does just the opposite: reproduces the information stored in
16*86d7f5d3SJohn Marino  * src of the length blocksize*blocknumbers into dst of the length
17*86d7f5d3SJohn Marino  * blocksize.
18*86d7f5d3SJohn Marino  *
19*86d7f5d3SJohn Marino  * On error, both functions return -1, 0 otherwise.
20*86d7f5d3SJohn Marino  */
21*86d7f5d3SJohn Marino 
22*86d7f5d3SJohn Marino int AF_split(char *src, char *dst, size_t blocksize, unsigned int blocknumbers, const char *hash);
23*86d7f5d3SJohn Marino int AF_merge(char *src, char *dst, size_t blocksize, unsigned int blocknumbers, const char *hash);
24*86d7f5d3SJohn Marino 
25*86d7f5d3SJohn Marino #endif
26