From f5ca983f885d1fb4e5fef2010c2db01300bea731 Mon Sep 17 00:00:00 2001 From: Tobias Boege Date: Sun, 7 Jun 2020 01:51:17 +0200 Subject: [PATCH] gb.openssl: Add tests for new Pbkdf2 and Scrypt methods [GB.OPENSSL] * NEW: Add beginning of a test suite. * OPT: Avoid doubles in integer power-of-two test. --- gb.openssl/openssl-test/.directory | 2 ++ gb.openssl/openssl-test/.icon.png | Bin 0 -> 11170 bytes gb.openssl/openssl-test/.project | 8 +++++ gb.openssl/openssl-test/.src/Main.module | 36 +++++++++++++++++++++++ gb.openssl/src/c_openssl.c | 3 +- 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gb.openssl/openssl-test/.directory create mode 100644 gb.openssl/openssl-test/.icon.png create mode 100644 gb.openssl/openssl-test/.project create mode 100644 gb.openssl/openssl-test/.src/Main.module diff --git a/gb.openssl/openssl-test/.directory b/gb.openssl/openssl-test/.directory new file mode 100644 index 000000000..06dab1c8a --- /dev/null +++ b/gb.openssl/openssl-test/.directory @@ -0,0 +1,2 @@ +[Desktop Entry] +Icon=./.icon.png diff --git a/gb.openssl/openssl-test/.icon.png b/gb.openssl/openssl-test/.icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb57088d4d27e28a1e2efdf17950e82cf02d8bf GIT binary patch literal 11170 zcmb_?byQU0xAvIXuD}PHf5+Z7D zZI1SYD+urz|Acc}toIgBGc0jK4G9VnK%KI9+Q=8EC8z8RIjg6SiY#GL6^*Mo5`@v&Zw<3ZtT%yQ2LxT~W47kC=pGbG@;2Lhq4;16KM9=B zKBlm=AvqZAS{D}K_~Eu??p62oOG*iyw}x6!@`Fh)Yc6GORoth7p->^7_~7M9HyCU| z83tP>CLuANAoD^(9QgV2R7f~Mvs}$ZLg#&RML}Z;U6c*n0f4mc<`44jAt?g@umUOy zvO3;byV=9e>`FO{UANCGEAeB;0!xivH5SsT2uc(L&`SKIA9(Z{6#?HfeU0KXHxKT( zxV7Kid2WM3-s;@7SPI>ZU9N{*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