vendor/libsodium/test/default/generichash.c in rbnacl-libsodium-1.0.4 vs vendor/libsodium/test/default/generichash.c in rbnacl-libsodium-1.0.5

- old
+ new

@@ -1299,23 +1299,23 @@ unsigned char *key; unsigned char *out; size_t i = 0U; size_t in_len; - key = sodium_malloc(crypto_generichash_KEYBYTES_MAX); - out = sodium_malloc(crypto_generichash_BYTES_MAX); - expected_out = sodium_malloc(crypto_generichash_BYTES_MAX); + key = (unsigned char *) sodium_malloc(crypto_generichash_KEYBYTES_MAX); + out = (unsigned char *) sodium_malloc(crypto_generichash_BYTES_MAX); + expected_out = (unsigned char *) sodium_malloc(crypto_generichash_BYTES_MAX); do { assert(strlen(tests[i].key_hex) == 2 * crypto_generichash_KEYBYTES_MAX); sodium_hex2bin(key, crypto_generichash_KEYBYTES_MAX, tests[i].key_hex, strlen(tests[i].key_hex), NULL, NULL, NULL); assert(strlen(tests[i].out_hex) == 2 * crypto_generichash_BYTES_MAX); sodium_hex2bin(expected_out, crypto_generichash_BYTES_MAX, tests[i].out_hex, strlen(tests[i].out_hex), NULL, NULL, NULL); in_len = strlen(tests[i].in_hex) / 2; - in = sodium_malloc(in_len); + in = (unsigned char *) sodium_malloc(in_len); sodium_hex2bin(in, in_len, tests[i].in_hex, strlen(tests[i].in_hex), NULL, NULL, NULL); crypto_generichash(out, crypto_generichash_BYTES_MAX, in, (unsigned long long) in_len, key, crypto_generichash_KEYBYTES_MAX);