Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FILE *openFile, *resultFile;
- char buffer[8], key[8] = "01234567";
- if ((openFile = fopen("c:/dev/encoding/test.xlsx", "rb")) == NULL) {
- printf("Cannot open file.n");
- exit(1);
- }
- if ((resultFile = fopen("c:/dev/encoding/test.enc", "wb")) == NULL) {
- printf("Cannot open file.n");
- exit(1);
- }
- fread(buffer, sizeof(char), 8, openFile);
- do {
- encrypt(buffer, key);
- if ((fwrite(buffer, sizeof(char), 8, resultFile)) != 8) {
- printf("Fatal Error writing output file!!!n");
- exit(-1);
- }
- fread(buffer, sizeof(char), 8, openFile);
- } while (!feof(openFile));
- fclose(openFile);
- fclose(resultFile);
Add Comment
Please, Sign In to add comment