We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blake2s.c
If defined __SSE4_1__, and compile with MSVC, there are some data cast warnings. Patch to fix (this patch is for Python 3.10's bundled blake2 code):
__SSE4_1__
Modules/_blake2/impl/blake2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/_blake2/impl/blake2s.c b/Modules/_blake2/impl/blake2s.c index 47514685b8f..781588ea26d 100644 --- a/Modules/_blake2/impl/blake2s.c +++ b/Modules/_blake2/impl/blake2s.c @@ -214,7 +214,7 @@ int blake2s_init( blake2s_state *S, size_t outlen ) const blake2s_param P = { - outlen, + ( uint8_t ) outlen, 0, 1, 1, @@ -237,8 +237,8 @@ int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t k const blake2s_param P = { - outlen, - keylen, + ( uint8_t ) outlen, + ( uint8_t ) keylen, 1, 1, 0, @@ -325,8 +325,8 @@ int blake2s_update( blake2s_state *S, const uint8_t *in, size_t inlen ) { while( inlen > 0 ) { - size_t left = S->buflen; - size_t fill = 2 * BLAKE2S_BLOCKBYTES - left; + uint32_t left = S->buflen; + uint32_t fill = 2 * BLAKE2S_BLOCKBYTES - left; if( inlen > fill ) { @@ -342,7 +342,7 @@ int blake2s_update( blake2s_state *S, const uint8_t *in, size_t inlen ) else /* inlen <= fill */ { memcpy( S->buf + left, in, inlen ); - S->buflen += inlen; // Be lazy, do not compress + S->buflen += ( uint32_t ) inlen; // Be lazy, do not compress in += inlen; inlen -= inlen; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If defined
__SSE4_1__
, and compile with MSVC, there are some data cast warnings.Patch to fix (this patch is for Python 3.10's bundled blake2 code):
The text was updated successfully, but these errors were encountered: