1 | svoid test_MD5() {
|
2 | var data = utf8("");
|
3 | printStruct(+data); |
4 | S s = md5(data); |
5 | var bytes = md5AsByteArray(data); |
6 | printStruct(+bytes); |
7 | //print(asList(parseHexBytes(s)); |
8 | var md5 = new MD5(data); |
9 | printVars(a := md5.a, b := md5.b, max := Long.MAX_VALUE, a := longToHex(md5.a), a := asList(longToBytes(md5.a))); |
10 | printVars(a1 := intFromBytes_bigEndian(bytes, 0), a2 := intFromBytes_bigEndian(bytes, 4)); |
11 | printVars(aShouldBe := longFromBytes_bigEndian(bytes, 0)); |
12 | assertEqualsVerbose("MD5=" + s, str(md5));
|
13 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1035811 |
| Snippet name: | test_MD5 |
| Eternal ID of this version: | #1035811/4 |
| Text MD5: | d56aced8021e06c6a737f1c690a5793a |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-07-29 22:00:10 |
| Source code size: | 533 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 350 / 373 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |