1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

C++ compat

This commit is contained in:
Frank Denis 2014-11-20 11:35:32 -08:00
parent d3e716aa49
commit 4f70e7c171

View File

@ -21,9 +21,9 @@ int main(void)
unsigned char *alicepk;
int i;
k = sodium_malloc(crypto_scalarmult_BYTES);
bobsk = sodium_malloc(crypto_scalarmult_SCALARBYTES);
alicepk = sodium_malloc(crypto_scalarmult_SCALARBYTES);
k = (unsigned char *) sodium_malloc(crypto_scalarmult_BYTES);
bobsk = (unsigned char *) sodium_malloc(crypto_scalarmult_SCALARBYTES);
alicepk = (unsigned char *) sodium_malloc(crypto_scalarmult_SCALARBYTES);
assert(k != NULL && bobsk != NULL && alicepk != NULL);
memcpy(bobsk, bobsk_, crypto_scalarmult_SCALARBYTES);