summaryrefslogtreecommitdiffstats
path: root/runtime/libgcry.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/libgcry.c')
-rw-r--r--runtime/libgcry.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/runtime/libgcry.c b/runtime/libgcry.c
index c1ab3abf..af70e581 100644
--- a/runtime/libgcry.c
+++ b/runtime/libgcry.c
@@ -199,43 +199,3 @@ rsgcryExit(void)
{
return;
}
-
-#if 0 // we use this for the tool, only!
-static void
-doDeCrypt(FILE *fpin, FILE *fpout)
-{
- gcry_error_t gcryError;
- char buf[64*1024];
- size_t nRead, nWritten;
- size_t nPad;
-
- while(1) {
- nRead = fread(buf, 1, sizeof(buf), fpin);
- if(nRead == 0)
- break;
- nPad = (blkLength - nRead % blkLength) % blkLength;
- fprintf(stderr, "read %d chars, blkLength %d, mod %d, pad %d\n", nRead, blkLength,
- nRead % blkLength, nPad);
- gcryError = gcry_cipher_decrypt(
- gcryCipherHd, // gcry_cipher_hd_t
- buf, // void *
- nRead, // size_t
- NULL, // const void *
- 0); // size_t
- if (gcryError) {
- fprintf(stderr, "gcry_cipher_encrypt failed: %s/%s\n",
- gcry_strsource(gcryError),
- gcry_strerror(gcryError));
- return;
- }
-fprintf(stderr, "in remove pad, %d\n", nRead);
- removePadding(buf, &nRead);
-fprintf(stderr, "out remove pad %d\n", nRead);
- nWritten = fwrite(buf, 1, nRead, fpout);
- if(nWritten != nRead) {
- perror("fpout");
- return;
- }
- }
-}
-#endif