Fix build in Xcode and GCC.

This commit is contained in:
John Preston 2019-07-09 16:18:18 +02:00
parent e123399f7c
commit 33fce38f90
2 changed files with 3 additions and 3 deletions

View file

@ -450,7 +450,7 @@ inline bytes::vector HmacSha256(
bytes::const_span key,
bytes::const_span data) {
auto result = bytes::vector(kSha256Size);
auto length = unsigned int(kSha256Size);
auto length = (unsigned int)kSha256Size;
HMAC(
EVP_sha256(),

View file

@ -184,8 +184,8 @@ void _initMsgIdConstants() {
const auto valid = (size == 16)
|| (size == 17
&& (password[0] == '3')
&& ((password[1] >= 'Q') && (password[1] <= 'Z')
|| (password[1] >= 'a') && (password[1] <= 'f')))
&& ((password[1] >= 'Q' && password[1] <= 'Z')
|| (password[1] >= 'a' && password[1] <= 'f')))
|| (size >= 21
&& (password[0] == '7')
&& (password[1] >= 'g')