File:  [parser3project] / parser3 / tests / 141.html
Revision 1.12: download - view: text, annotated - select for diffs - revision graph
Fri Dec 6 21:45:02 2024 UTC (18 months, 4 weeks ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, HEAD
test for ^math:digest[...; $.hmac[$file] $.format[file] ] added (related to feature #1263)

1   $uuid[^math:uuid[]]^uuid.length[]<br />
1.1   $uuid[^math:uuid[ $.solid(true)]] ^uuid.length[]<br />
1.2   $uuid[^math:uuid[ $.lower(true)]] ^uuid.length[]<br />
1.3   $uuid[^math:uuid[ $.lower(true) $.solid(true)]] ^uuid.length[]<br />

1.5 $uid64[^math:uid64[]] ^uid64.length[]<br />
1.6 $uid64[^math:uid64[ $.lower(true) ]] ^uid64.length[]<br />

1.7   $uuid7[^math:uuid7[]]^uuid7.length[]<br />
1.8   $uuid7[^math:uuid7[ $.solid(true)]] ^uuid7.length[]<br />
1.9   $uuid7[^math:uuid7[ $.lower(true)]] ^uuid7.length[]<br />
1.10   $uuid7[^math:uuid7[ $.lower(true) $.solid(true)]] ^uuid7.length[]<br />

2   $long[very-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-long-key]

3   ^math:md5[123]<br />
3.1 ^math:digest[md5;123]<br />
3.2 ^math:digest[md5;123; $.hmac[pwd] ]<br />
3.3 ^math:digest[md5;123; $.hmac[$long] $.format[base64] ]<br />

4   ^math:sha1[123]<br />
4.1 ^math:digest[sha1;123]<br />
4.2 ^math:digest[sha1;123; $.hmac[pwd] ]<br />
4.3 ^math:digest[sha1;123; $.hmac[$long] $.format[base64] ]<br />

5   ^math:digest[sha256;123; $.hmac[pwd] ]<br />
5.1 ^math:digest[sha256;123; $.hmac[$long] $.format[base64] ]<br />

6   ^math:digest[sha512;123]<br />
6.1 ^math:digest[sha512;123; $.hmac[pwd] ]<br />
6.2 ^math:digest[sha512;123; $.hmac[$long$long] $.format[base64] ]<br />

$paf[^file::load[binary;019paf2001.gif]]

7   ^math:digest[md5;$paf]<br />
7.1 ^math:digest[sha256;$paf]<br />

$s[{ "name": "^taint[json;va"lue]" }]
$f[^file::create[$s]]

8   ^math:md5[$s] = ^math:md5[$f.text]<br />
8.1 ^math:digest[sha1;$s] = ^math:digest[sha1;$f.text]<br />

$f[^file::create[test]]

9 $r[^math:digest[sha512;123; $.hmac[$f] $.format[file] ]]<br />
  ^json:string[$r; $.file[base64] ]
  ^math:digest[sha512;123; $.hmac[$f.text] $.format[base64] ]<br />

E-mail: