fix warning in gcrypt usage
This commit is contained in:
parent
69cff71cb6
commit
9e376cae9f
|
@ -94,9 +94,9 @@ namespace libtorrent {
|
|||
|
||||
hasher& hasher::update(span<char const> data)
|
||||
{
|
||||
TORRENT_ASSERT(!data.empty());
|
||||
TORRENT_ASSERT(data.size() > 0);
|
||||
#ifdef TORRENT_USE_LIBGCRYPT
|
||||
gcry_md_write(m_context, data.data(), data.size());
|
||||
gcry_md_write(m_context, data.data(), static_cast<std::size_t>(data.size()));
|
||||
#elif TORRENT_USE_COMMONCRYPTO
|
||||
CC_SHA1_Update(&m_context, reinterpret_cast<unsigned char const*>(data.data()), CC_LONG(data.size()));
|
||||
#elif TORRENT_USE_CRYPTOAPI
|
||||
|
|
|
@ -82,9 +82,9 @@ namespace libtorrent {
|
|||
|
||||
hasher512& hasher512::update(span<char const> data)
|
||||
{
|
||||
TORRENT_ASSERT(!data.empty());
|
||||
TORRENT_ASSERT(data.size() > 0);
|
||||
#ifdef TORRENT_USE_LIBGCRYPT
|
||||
gcry_md_write(m_context, data.data(), data.size());
|
||||
gcry_md_write(m_context, data.data(), static_cast<std::size_t>(data.size()));
|
||||
#elif TORRENT_USE_COMMONCRYPTO
|
||||
CC_SHA512_Update(&m_context, reinterpret_cast<unsigned char const*>(data.data()), CC_LONG(data.size()));
|
||||
#elif TORRENT_USE_CRYPTOAPI_SHA_512
|
||||
|
|
Loading…
Reference in New Issue