summaryrefslogtreecommitdiff
path: root/lib/crypto/test/md5.myr
blob: bc0939f63853fee10aee337288ca7482bd31fa95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std
use crypto

use "util"

const main = {
	hasheq(crypto.md5("")[:], \
		"d41d8cd98f00b204e9800998ecf8427e")
	hasheq(crypto.md5("h")[:], \
		"2510c39011c5be704182423e3a695e91")
	/* 64 byte block */
	hasheq(crypto.md5("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")[:], \
		"014842d480b571495a4a0363793f7367")
	/* tail spanning */
	hasheq(crypto.md5("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbb")[:], \
		"3b0bb4c5ece4a6568caa7266e740a140")
}