- broken - reimplementing z85 decoder, using hyphens again, doesn't work yet...

This commit is contained in:
git@daemon.de
2014-03-01 11:58:10 +01:00
parent 32b24a08c5
commit b8552af5e9
11 changed files with 363 additions and 68 deletions

View File

@@ -4,8 +4,33 @@
#include <pcp.h>
int linetest() {
FILE *in;
if((in = fopen("x", "rb")) == NULL) {
fprintf(stderr, "oops, could not open file!\n");
return 1;
}
Pcpstream *pin = ps_new_file(in);
ps_setdetermine(pin, 8);
size_t got;
byte data[9] = {0};
while(!ps_end(pin)) {
if((got = ps_read(pin, data, 8)) > 0) {
fwrite(data, 1, got, stdout);
}
}
ps_close(pin);
return 0;
}
int main() {
/* create a file with "encrypted" data */
return linetest();
FILE *out, *in;
unsigned char clear[8] = "ABCDEFGH";
unsigned char key[8] = "IxD8Lq1K";