Sergei
181642d2f8
test: improve: validate cipher bytes after encryption
...
The independent cipher bytes (encrypted text) are gotten on a 3rd party site.
2026-06-26 15:34:49 -07:00
Nathan Moin Vaziri
ece5b06dcf
test: skip AES-GCM test when build doesn't support it
...
The Apple crypto backend defaults MZ_TARGET_APPSTORE to 1, which
makes mz_crypt_aes_set_key return MZ_SUPPORT_ERROR for GCM mode
because the GCM CommonCrypto APIs are private and rejected by App
Store review. The test was hard-coded to expect MZ_OK and failed on
the default macOS build.
Skip the test when the runtime reports MZ_SUPPORT_ERROR; otherwise
proceed and verify correctness as before.
2026-04-25 01:24:48 -07:00
tbeu
1529686f37
Apply Clang format
2025-03-23 14:09:01 -07:00
Sergey Markelov
1e2d77345a
Fix test crypt.rand: random_bytes[0] can be 0, std::string(random_bytes)
...
gets empty C string.
2023-05-17 15:50:06 -07:00
Sergey Markelov
1fdcfef544
Support AAD in AES-GCM
2023-05-05 13:53:16 -04:00
Nathan Moinvaziri
780459d80c
Change to use encrypt/decrypt final functions in mz_aes.
2023-04-26 19:58:41 -07:00
Nathan Moinvaziri
c958ac8f7c
Add unit test for any length in AES-GCM.
2023-04-26 19:58:29 -07:00
Nathan Moinvaziri
99efb55637
Clean up and rename mz_crypt_aes interface.
2023-04-26 10:45:44 -07:00
Nathan Moinvaziri
faf14369d9
Rename crypto unit tests.
2023-04-26 09:47:27 -07:00
Nathan Moinvaziri
1c24464e50
Implement verification of AES-GCM tag with OpenSSL.
2023-04-25 23:28:37 -07:00
Nathan Moinvaziri
8964058d0c
Added AES-GCM unit test and fixed BCrypt code.
2023-04-25 23:27:50 -07:00
Nathan Moinvaziri
b366e5cc6f
Improve hmac unit test with multiple calls to update.
2023-04-25 18:17:40 -07:00
Nathan Moinvaziri
c74bb95701
Skip unsupported SHA hash algorithms in unit tests.
2023-04-24 10:28:54 -07:00
Nathan Moinvaziri
ce42d1e81c
Added support for OpenSSL version 3.
2023-04-18 13:49:06 -07:00
Nathan Moinvaziri
fcde5c5ba7
Added optional support for AES CBC mode to mz_crypt_aes.
2023-04-17 14:32:06 -07:00
Nathan Moinvaziri
3394c29b52
Fixed wrong usage of create function for sha224 test.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
f9203e7a55
Remove SHA224 support for Windows.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
217adc9363
Remove first param from create functions.
...
Better handle low memory situations.
2023-04-09 11:14:26 -07:00
Nathan Moinvaziri
5f5d899164
Added PBKDF2 test vectors.
2023-04-07 18:22:07 -07:00
Mircea Baja
2eb6305346
Fixed incorrect handling of long odd length passwords
2023-03-14 09:40:49 -07:00
Nathan Moinvaziri
03e4d2213d
Remove copyright years.
2023-02-16 13:14:21 -08:00
Sergey Markelov
63f927345b
Encryption support on UWP
2023-02-16 11:27:07 -08:00
Sergey Markelov
de9e622832
Test case for crypt random number generator
2023-02-13 17:32:25 -08:00
Sergey Markelov
d87de80493
Fix passed AES crypt test if native encrypt/decrypt functions fail
2023-02-13 17:32:25 -08:00
Sergey
dd6f10fe8c
Remove unused computed_hash buffer in AES crypt test
2023-02-13 17:32:25 -08:00
Nathan Moinvaziri
1ede6f9b5e
Fixed compare of narrow type with wide type in loop in mz_crypt_pbkdf2.
2023-02-12 16:03:25 -08:00
Nathan Moinvaziri
d03ca72a25
Implement Google test framework.
2022-10-13 09:51:47 -07:00