aboutsummaryrefslogtreecommitdiff
path: root/src/tests/md5.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/md5.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/md5.cpp b/src/tests/md5.cpp
new file mode 100644
index 0000000..dea957b
--- /dev/null
+++ b/src/tests/md5.cpp
@@ -0,0 +1,27 @@
1#include "bu/sio.h"
2#include "bu/file.h"
3#include "bu/md5.h"
4
5using Bu::sio;
6
7int main( int argc, char *argv[] )
8{
9 argv++, argc--;
10 for(; *argv; argv++ )
11 {
12 Bu::File fIn( *argv, Bu::File::Read );
13 Bu::Md5 m;
14
15 char buf[1000];
16 for(;;)
17 {
18 int iRead = fIn.read( buf, 1000 );
19 m.addData( buf, iRead );
20 if( iRead < 1000 )
21 break;
22 }
23
24 sio << m.getResult() << " *" << *argv << sio.nl;
25 }
26}
27