mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 04:25:10 -07:00
Add some more base64 decoding tests
This commit is contained in:
parent
0d7c5bec06
commit
6d566070b4
@ -200,6 +200,12 @@ main(void)
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "O", (size_t) 1U, NULL, NULL, NULL,
|
||||
sodium_base64_VARIANT_ORIGINAL_NO_PADDING) == -1);
|
||||
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "", (size_t) 0U, NULL, NULL, NULL,
|
||||
sodium_base64_VARIANT_ORIGINAL) == 0);
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "A", (size_t) 1U, NULL, NULL, NULL,
|
||||
sodium_base64_VARIANT_ORIGINAL) == -1);
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "AA", (size_t) 2U, NULL, NULL, NULL,
|
||||
sodium_base64_VARIANT_ORIGINAL) == -1);
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "kaw", (size_t) 3U, NULL, NULL, NULL,
|
||||
sodium_base64_VARIANT_ORIGINAL) == -1);
|
||||
assert(sodium_base642bin(buf1, sizeof buf1, "kQ*", (size_t) 3U, "@", NULL, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user