*/
// clang-format off
+
+#include <cstddef>
+
#ifdef WIN32
#include <windows.h>
#include <wincrypt.h>
#include <config.h>
-#if USE_SYSTEM_GMP || defined (__ANDROID__) || defined (ANDROID)
+#if USE_SYSTEM_GMP
#include <gmp.h>
#else
#include <mini-gmp.h>
case SRP_SHA384: return SHA384_DIGEST_LENGTH;
case SRP_SHA512: return SHA512_DIGEST_LENGTH;
*/
- default: return -1;
+ default: return 0;
};
}
// clang-format on
}
static SRP_Result H_ns(mpz_t result, SRP_HashAlgorithm alg, const unsigned char *n,
- size_t len_n, const unsigned char *bytes, uint32_t len_bytes)
+ size_t len_n, const unsigned char *bytes, size_t len_bytes)
{
unsigned char buff[SHA512_DIGEST_LENGTH];
size_t nbytes = len_n + len_bytes;
goto cleanup_and_exit;
*bytes_M = usr->M;
- if (len_M) *len_M = hash_length(usr->hash_alg);
+ *len_M = hash_length(usr->hash_alg);
} else {
*bytes_M = NULL;
- if (len_M) *len_M = 0;
+ *len_M = 0;
}
cleanup_and_exit: