Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_unix/sys/src/libsec/port/hmactest.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "os.h"
2
#include <mp.h>
3
#include <libsec.h>
4
 
5
uchar key[] = "Jefe";
6
uchar data[] = "what do ya want for nothing?";
7
 
8
void
9
main(void)
10
{
11
	int i;
12
	uchar hash[MD5dlen];
13
 
14
	hmac_md5(data, strlen((char*)data), key, 4, hash, nil);
15
	for(i=0; i<MD5dlen; i++)
16
		print("%2.2x", hash[i]);
17
	print("\n");
18
	print("750c783e6ab0b503eaa86e310a5db738\n");
19
}