]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost12sum.c
gost_crypt: process full available block in CFB and CNT mode
[openssl-gost/engine.git] / gost12sum.c
index 0fdaf4f58bd8b1b1a717e8400e52228eca616bbd..4936d7e4b27217edeafd4ac3e1f6cae20d86be83 100644 (file)
@@ -214,12 +214,12 @@ int hash_file(gost_hash_ctx * ctx, char *filename, char *sum, int mode)
 int hash_stream(gost_hash_ctx * ctx, int fd, char *sum)
 {
     unsigned char buffer[BUF_SIZE];
-    unsigned char reverted_buffer[BUF_SIZE];
     ssize_t bytes;
-    int i, j, k;
+               size_t i;
+
     start_hash12(ctx);
     while ((bytes = read(fd, buffer, BUF_SIZE)) > 0) {
-        hash12_block(ctx, reverted_buffer, bytes);
+        hash12_block(ctx, buffer, bytes);
     }
     if (bytes < 0) {
         return 0;
@@ -260,7 +260,7 @@ int get_line(FILE *f, char *hash, char *filename, int verbose)
         return 1;
  nextline:
         if (verbose)
-            printf(filename);
+           printf("%s\n", filename);
     }
     return 0;
 }