blob: 5c7014ed0c156b36984136c8d06f4a2e7b36ebbf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#include <ctype.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
#ifndef __GNUC__
#include <io.h>
#else
#include <unistd.h>
#endif
#include <cipherfil.h>
#include <versekey.h>
#include <rawtext.h>
int main(int argc, char **argv) {
VerseKey key;
RawText *rawdrv;
if (argc != 3) {
fprintf(stderr, "usage: %s <datapath> \"<key>\"\n", argv[0]);
exit(1);
}
rawdrv = new RawText(argv[1]);
rawdrv->AddRawFilter(new CipherFilter(argv[2]));
printf("\n");
key.AutoNormalize(0);
key.Headings(1);
for (key.Index(0); (!key.Error()); key++) {
rawdrv->Key(key);
printf("%s: %s\n", (const char *)key, (const char *)*rawdrv);
}
return 0;
}
|