1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

C++ compat

This commit is contained in:
Frank Denis 2015-10-12 14:44:00 +02:00
parent 84625742c6
commit f169623d4e

View File

@ -3138,7 +3138,7 @@ tv(void)
assert((size_t) found_ciphertext_len == ciphertext_len);
if (memcmp(ciphertext, expected_ciphertext, ciphertext_len) != 0) {
printf("Encryption of test vector #%u failed\n", (unsigned int) i);
hex = sodium_malloc(found_ciphertext_len * 2 + 1);
hex = (char *) sodium_malloc(found_ciphertext_len * 2 + 1);
sodium_bin2hex(hex, found_ciphertext_len * 2 + 1,
ciphertext, ciphertext_len);
printf("Computed: [%s]\n", hex);