# HG changeset patch # User Claus Gittinger # Date 1553379988 -3600 # Node ID 3f081e763b872bf3de40515818794da4fbfa0ec6 # Parent 52c5782a14b9dc07b372b9ce8e7ba3b773d90149 #QUALITY by cg class: RegressionTests::CryptTests changed: #test19_sha3_512 diff -r 52c5782a14b9 -r 3f081e763b87 RegressionTests__CryptTests.st --- a/RegressionTests__CryptTests.st Sat Mar 23 23:05:39 2019 +0100 +++ b/RegressionTests__CryptTests.st Sat Mar 23 23:26:28 2019 +0100 @@ -1095,7 +1095,8 @@ test19_sha3_512 |h| - "/ test vectors from https://www.di-mgt.com.au/sha_testvectors.html + "/ test vectors from https://www.di-mgt.com.au/sha_testvectors.html, + "/ https://github.com/XKCP/XKCP/blob/master/tests/TestVectors/ShortMsgKAT_SHA3-512.txt "/ and others self @@ -1105,6 +1106,18 @@ h := SHA3_512Stream hashValueOf:''. self assert:(h = (ByteArray fromHexStringWithSeparators:'a69f73cca23a9ac5 c8b567dc185a756e 97c982164fe25859 e0d1dcc1475c80a6 15b2123af1f5f94c 11e3e9402c3ac558 f500199d95b6d3e3 01758586281dcd26')). + h := SHA3_512Stream hashValueOf:#[16rcc]. + self assert:(h = (ByteArray fromHexStringWithSeparators:'3939FCC8B57B63612542DA31A834E5DCC36E2EE0F652AC72E02624FA2E5ADEECC7DD6BB3580224B4D6138706FC6E80597B528051230B00621CC2B22999EAA205')). + + h := SHA3_512Stream hashValueOf:#[16r41 16rFB]. + self assert:(h = (ByteArray fromHexStringWithSeparators:'AA092865A40694D91754DBC767B5202C546E226877147A95CB8B4C8F8709FE8CD6905256B089DA37896EA5CA19D2CD9AB94C7192FC39F7CD4D598975A3013C69')). + + h := SHA3_512Stream hashValueOf:#[16r1F 16r87 16r7C]. + self assert:(h = (ByteArray fromHexStringWithSeparators:'CB20DCF54955F8091111688BECCEF48C1A2F0D0608C3A575163751F002DB30F40F2F671834B22D208591CFAF1F5ECFE43C49863A53B3225BDFD7C6591BA7658B')). + + h := SHA3_512Stream hashValueOf:#[16r21 16rF1 16r34 16rAC 16r57]. + self assert:(h = (ByteArray fromHexStringWithSeparators:'584219A84E8796076BF1178B14B9D1E2F96A4B4EF11F10CC516FBE1A29639D6BA74FB92815F9E3C5192ED4DCA20AEA5B109D52237C9956401FD44B221F82AB37')). + "/ h := SHA3_512Stream hashValueOf:'The quick brown fox jumps over the lazy dog'. "/ self assert:(h = (ByteArray fromHexStringWithSeparators:'d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592')). @@ -1126,6 +1139,7 @@ " "Created: / 22-03-2019 / 12:45:45 / Claus Gittinger" + "Modified: / 23-03-2019 / 23:25:53 / Claus Gittinger" ! test99_speed