source: trunk/Softwares/MiBench/src/c/sha-sha_driver.c @ 120

Last change on this file since 120 was 117, checked in by rosiere, 15 years ago

1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 553 bytes
Line 
1/* NIST Secure Hash Algorithm */
2
3#include <stdlib.h>
4#include <stdio.h>
5#include <string.h>
6#include <time.h>
7#include "sha-sha.h"
8
9int main_sha(int argc, char **argv)
10{
11    FILE *fin;
12    SHA_INFO sha_info;
13
14    if (argc < 2) {
15        fin = stdin;
16        sha_stream(&sha_info, fin);
17        sha_print(&sha_info);
18    } else {
19        while (--argc) {
20            fin = fopen(*(++argv), "rb");
21            if (fin == NULL) {
22                printf("error opening %s for reading\n", *argv);
23            } else {
24                sha_stream(&sha_info, fin);
25                sha_print(&sha_info);
26                fclose(fin);
27            }
28        }
29    }
30    return(0);
31}
Note: See TracBrowser for help on using the repository browser.