1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Use unsigned long long for opslimit

Fixes #966
This commit is contained in:
Frank Denis 2020-06-03 17:33:18 +02:00
parent 039da3af81
commit 0cb4db084f
8 changed files with 38 additions and 38 deletions

View File

@ -72,14 +72,14 @@ crypto_pwhash_argon2i_strprefix(void)
return crypto_pwhash_argon2i_STRPREFIX;
}
size_t
unsigned long long
crypto_pwhash_argon2i_opslimit_min(void)
{
COMPILER_ASSERT(crypto_pwhash_argon2i_OPSLIMIT_MIN >= ARGON2_MIN_TIME);
return crypto_pwhash_argon2i_OPSLIMIT_MIN;
}
size_t
unsigned long long
crypto_pwhash_argon2i_opslimit_max(void)
{
COMPILER_ASSERT(crypto_pwhash_argon2i_OPSLIMIT_MAX <= ARGON2_MAX_TIME);
@ -100,7 +100,7 @@ crypto_pwhash_argon2i_memlimit_max(void)
return crypto_pwhash_argon2i_MEMLIMIT_MAX;
}
size_t
unsigned long long
crypto_pwhash_argon2i_opslimit_interactive(void)
{
return crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE;
@ -112,7 +112,7 @@ crypto_pwhash_argon2i_memlimit_interactive(void)
return crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE;
}
size_t
unsigned long long
crypto_pwhash_argon2i_opslimit_moderate(void)
{
return crypto_pwhash_argon2i_OPSLIMIT_MODERATE;
@ -124,7 +124,7 @@ crypto_pwhash_argon2i_memlimit_moderate(void)
return crypto_pwhash_argon2i_MEMLIMIT_MODERATE;
}
size_t
unsigned long long
crypto_pwhash_argon2i_opslimit_sensitive(void)
{
return crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE;

View File

@ -68,14 +68,14 @@ crypto_pwhash_argon2id_strprefix(void)
return crypto_pwhash_argon2id_STRPREFIX;
}
size_t
unsigned long long
crypto_pwhash_argon2id_opslimit_min(void)
{
COMPILER_ASSERT(crypto_pwhash_argon2id_OPSLIMIT_MIN >= ARGON2_MIN_TIME);
return crypto_pwhash_argon2id_OPSLIMIT_MIN;
}
size_t
unsigned long long
crypto_pwhash_argon2id_opslimit_max(void)
{
COMPILER_ASSERT(crypto_pwhash_argon2id_OPSLIMIT_MAX <= ARGON2_MAX_TIME);
@ -96,7 +96,7 @@ crypto_pwhash_argon2id_memlimit_max(void)
return crypto_pwhash_argon2id_MEMLIMIT_MAX;
}
size_t
unsigned long long
crypto_pwhash_argon2id_opslimit_interactive(void)
{
return crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE;
@ -108,7 +108,7 @@ crypto_pwhash_argon2id_memlimit_interactive(void)
return crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE;
}
size_t
unsigned long long
crypto_pwhash_argon2id_opslimit_moderate(void)
{
return crypto_pwhash_argon2id_OPSLIMIT_MODERATE;
@ -120,7 +120,7 @@ crypto_pwhash_argon2id_memlimit_moderate(void)
return crypto_pwhash_argon2id_MEMLIMIT_MODERATE;
}
size_t
unsigned long long
crypto_pwhash_argon2id_opslimit_sensitive(void)
{
return crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE;

View File

@ -65,13 +65,13 @@ crypto_pwhash_strprefix(void)
return crypto_pwhash_STRPREFIX;
}
size_t
unsigned long long
crypto_pwhash_opslimit_min(void)
{
return crypto_pwhash_OPSLIMIT_MIN;
}
size_t
unsigned long long
crypto_pwhash_opslimit_max(void)
{
return crypto_pwhash_OPSLIMIT_MAX;
@ -89,7 +89,7 @@ crypto_pwhash_memlimit_max(void)
return crypto_pwhash_MEMLIMIT_MAX;
}
size_t
unsigned long long
crypto_pwhash_opslimit_interactive(void)
{
return crypto_pwhash_OPSLIMIT_INTERACTIVE;
@ -101,7 +101,7 @@ crypto_pwhash_memlimit_interactive(void)
return crypto_pwhash_MEMLIMIT_INTERACTIVE;
}
size_t
unsigned long long
crypto_pwhash_opslimit_moderate(void)
{
return crypto_pwhash_OPSLIMIT_MODERATE;
@ -113,7 +113,7 @@ crypto_pwhash_memlimit_moderate(void)
return crypto_pwhash_MEMLIMIT_MODERATE;
}
size_t
unsigned long long
crypto_pwhash_opslimit_sensitive(void)
{
return crypto_pwhash_OPSLIMIT_SENSITIVE;

View File

@ -105,13 +105,13 @@ crypto_pwhash_scryptsalsa208sha256_strprefix(void)
return crypto_pwhash_scryptsalsa208sha256_STRPREFIX;
}
size_t
unsigned long long
crypto_pwhash_scryptsalsa208sha256_opslimit_min(void)
{
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN;
}
size_t
unsigned long long
crypto_pwhash_scryptsalsa208sha256_opslimit_max(void)
{
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX;
@ -129,7 +129,7 @@ crypto_pwhash_scryptsalsa208sha256_memlimit_max(void)
return crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX;
}
size_t
unsigned long long
crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void)
{
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE;
@ -141,7 +141,7 @@ crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(void)
return crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE;
}
size_t
unsigned long long
crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void)
{
return crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE;

View File

@ -56,11 +56,11 @@ const char *crypto_pwhash_strprefix(void);
#define crypto_pwhash_OPSLIMIT_MIN crypto_pwhash_argon2id_OPSLIMIT_MIN
SODIUM_EXPORT
size_t crypto_pwhash_opslimit_min(void);
unsigned long long crypto_pwhash_opslimit_min(void);
#define crypto_pwhash_OPSLIMIT_MAX crypto_pwhash_argon2id_OPSLIMIT_MAX
SODIUM_EXPORT
size_t crypto_pwhash_opslimit_max(void);
unsigned long long crypto_pwhash_opslimit_max(void);
#define crypto_pwhash_MEMLIMIT_MIN crypto_pwhash_argon2id_MEMLIMIT_MIN
SODIUM_EXPORT
@ -72,7 +72,7 @@ size_t crypto_pwhash_memlimit_max(void);
#define crypto_pwhash_OPSLIMIT_INTERACTIVE crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE
SODIUM_EXPORT
size_t crypto_pwhash_opslimit_interactive(void);
unsigned long long crypto_pwhash_opslimit_interactive(void);
#define crypto_pwhash_MEMLIMIT_INTERACTIVE crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE
SODIUM_EXPORT
@ -80,7 +80,7 @@ size_t crypto_pwhash_memlimit_interactive(void);
#define crypto_pwhash_OPSLIMIT_MODERATE crypto_pwhash_argon2id_OPSLIMIT_MODERATE
SODIUM_EXPORT
size_t crypto_pwhash_opslimit_moderate(void);
unsigned long long crypto_pwhash_opslimit_moderate(void);
#define crypto_pwhash_MEMLIMIT_MODERATE crypto_pwhash_argon2id_MEMLIMIT_MODERATE
SODIUM_EXPORT
@ -88,7 +88,7 @@ size_t crypto_pwhash_memlimit_moderate(void);
#define crypto_pwhash_OPSLIMIT_SENSITIVE crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE
SODIUM_EXPORT
size_t crypto_pwhash_opslimit_sensitive(void);
unsigned long long crypto_pwhash_opslimit_sensitive(void);
#define crypto_pwhash_MEMLIMIT_SENSITIVE crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE
SODIUM_EXPORT

View File

@ -48,11 +48,11 @@ const char *crypto_pwhash_argon2i_strprefix(void);
#define crypto_pwhash_argon2i_OPSLIMIT_MIN 3U
SODIUM_EXPORT
size_t crypto_pwhash_argon2i_opslimit_min(void);
unsigned long long crypto_pwhash_argon2i_opslimit_min(void);
#define crypto_pwhash_argon2i_OPSLIMIT_MAX 4294967295U
SODIUM_EXPORT
size_t crypto_pwhash_argon2i_opslimit_max(void);
unsigned long long crypto_pwhash_argon2i_opslimit_max(void);
#define crypto_pwhash_argon2i_MEMLIMIT_MIN 8192U
SODIUM_EXPORT
@ -65,7 +65,7 @@ size_t crypto_pwhash_argon2i_memlimit_max(void);
#define crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE 4U
SODIUM_EXPORT
size_t crypto_pwhash_argon2i_opslimit_interactive(void);
unsigned long long crypto_pwhash_argon2i_opslimit_interactive(void);
#define crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE 33554432U
SODIUM_EXPORT
@ -73,7 +73,7 @@ size_t crypto_pwhash_argon2i_memlimit_interactive(void);
#define crypto_pwhash_argon2i_OPSLIMIT_MODERATE 6U
SODIUM_EXPORT
size_t crypto_pwhash_argon2i_opslimit_moderate(void);
unsigned long long crypto_pwhash_argon2i_opslimit_moderate(void);
#define crypto_pwhash_argon2i_MEMLIMIT_MODERATE 134217728U
SODIUM_EXPORT
@ -81,7 +81,7 @@ size_t crypto_pwhash_argon2i_memlimit_moderate(void);
#define crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE 8U
SODIUM_EXPORT
size_t crypto_pwhash_argon2i_opslimit_sensitive(void);
unsigned long long crypto_pwhash_argon2i_opslimit_sensitive(void);
#define crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE 536870912U
SODIUM_EXPORT

View File

@ -48,11 +48,11 @@ const char *crypto_pwhash_argon2id_strprefix(void);
#define crypto_pwhash_argon2id_OPSLIMIT_MIN 1U
SODIUM_EXPORT
size_t crypto_pwhash_argon2id_opslimit_min(void);
unsigned long long crypto_pwhash_argon2id_opslimit_min(void);
#define crypto_pwhash_argon2id_OPSLIMIT_MAX 4294967295U
SODIUM_EXPORT
size_t crypto_pwhash_argon2id_opslimit_max(void);
unsigned long long crypto_pwhash_argon2id_opslimit_max(void);
#define crypto_pwhash_argon2id_MEMLIMIT_MIN 8192U
SODIUM_EXPORT
@ -65,7 +65,7 @@ size_t crypto_pwhash_argon2id_memlimit_max(void);
#define crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE 2U
SODIUM_EXPORT
size_t crypto_pwhash_argon2id_opslimit_interactive(void);
unsigned long long crypto_pwhash_argon2id_opslimit_interactive(void);
#define crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE 67108864U
SODIUM_EXPORT
@ -73,7 +73,7 @@ size_t crypto_pwhash_argon2id_memlimit_interactive(void);
#define crypto_pwhash_argon2id_OPSLIMIT_MODERATE 3U
SODIUM_EXPORT
size_t crypto_pwhash_argon2id_opslimit_moderate(void);
unsigned long long crypto_pwhash_argon2id_opslimit_moderate(void);
#define crypto_pwhash_argon2id_MEMLIMIT_MODERATE 268435456U
SODIUM_EXPORT
@ -81,7 +81,7 @@ size_t crypto_pwhash_argon2id_memlimit_moderate(void);
#define crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE 4U
SODIUM_EXPORT
size_t crypto_pwhash_argon2id_opslimit_sensitive(void);
unsigned long long crypto_pwhash_argon2id_opslimit_sensitive(void);
#define crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE 1073741824U
SODIUM_EXPORT

View File

@ -45,11 +45,11 @@ const char *crypto_pwhash_scryptsalsa208sha256_strprefix(void);
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN 32768U
SODIUM_EXPORT
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_min(void);
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_min(void);
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX 4294967295U
SODIUM_EXPORT
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_max(void);
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_max(void);
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN 16777216U
SODIUM_EXPORT
@ -62,7 +62,7 @@ size_t crypto_pwhash_scryptsalsa208sha256_memlimit_max(void);
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE 524288U
SODIUM_EXPORT
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void);
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_interactive(void);
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE 16777216U
SODIUM_EXPORT
@ -70,7 +70,7 @@ size_t crypto_pwhash_scryptsalsa208sha256_memlimit_interactive(void);
#define crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE 33554432U
SODIUM_EXPORT
size_t crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void);
unsigned long long crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive(void);
#define crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE 1073741824U
SODIUM_EXPORT