13c62e93af95bf625bef8803f6bc1823ad3a6a01
[swift-upb.git] / exec / hasher.cpp
1 /*
2  *  hasher.cpp
3  *  swift
4  *
5  *  Created by Victor Grishchenko on 11/8/09.
6  *  Copyright 2009 Delft University of Technology. All rights reserved.
7  *
8  */
9 #include <stdio.h>
10 #include "hashtree.h"
11 #include "swift.h"
12
13
14 int main (int argn, char** args) {
15
16     if (argn<2) {
17         fprintf(stderr,"Usage: %s file_name\n",args[0]);
18         return 1;
19     }
20
21     swift::HashTree* ht = new swift::HashTree(args[1]);
22
23     printf("SHA1 Merkle tree root hash: %s\n",ht->root_hash().hex().c_str());
24
25 }
26