]> git.street.me.uk Git - andy/viking.git/blob - test/test_md5_hash.c
Merge pull request #17 from huobos/gpx
[andy/viking.git] / test / test_md5_hash.c
1 // Copyright: CC0
2 // Print md5 hash of the given string
3 #include <glib.h>
4 #include <glib/gstdio.h>
5 #include "md5_hash.h"
6
7 int main(int argc, char *argv[])
8 {
9 #if !GLIB_CHECK_VERSION(2,36,0)
10   g_type_init ();
11 #endif
12
13   if ( !argv[1] ) {
14     g_printerr ( "Nothing specified\n" );
15     return 1;
16   }
17
18   gchar *hash = md5_hash ( argv[1] );
19   g_printf ( "%s\n", hash );
20   g_free ( hash );
21
22   return 0;
23 }
24