Cast CryptGenRandom pointer to (BYTE *) to make MSVC happy when compiling as a C++ project

This commit is contained in:
Frank Denis 2013-10-14 13:40:54 -07:00
parent 6df6be8911
commit 8fa91a91ab
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ randombytes_salsa20_random_stir(void)
abort();
}
#else /* _WIN32 */
if (! CryptGenRandom(stream.hcrypt_prov, sizeof m0, m0)) {
if (! CryptGenRandom(stream.hcrypt_prov, sizeof m0, (BYTE *) m0)) {
abort();
}
#endif

View File

@ -167,7 +167,7 @@ randombytes_sysrandom_buf(void * const buf, const size_t size)
abort();
}
#else
if (! CryptGenRandom(stream.hcrypt_prov, size, buf)) {
if (! CryptGenRandom(stream.hcrypt_prov, size, (BYTE *) buf)) {
abort();
}
#endif