mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 10:37:24 -07:00
Remove non-threadsafe versions of the crypt(3)-like interface to scrypt.
This commit is contained in:
parent
d3605bf4c3
commit
7791007caf
@ -170,22 +170,6 @@ escrypt_r(escrypt_local_t * local,
|
||||
return buf;
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
escrypt(const uint8_t * passwd, const uint8_t * setting)
|
||||
{
|
||||
static uint8_t buf[4 + 1 + 5 + 5 + BYTES2CHARS(32) + 1 + HASH_LEN + 1];
|
||||
escrypt_local_t local;
|
||||
uint8_t * retval;
|
||||
|
||||
if (escrypt_init_local(&local))
|
||||
return NULL;
|
||||
retval = escrypt_r(&local,
|
||||
passwd, strlen((char *)passwd), setting, buf, sizeof(buf));
|
||||
if (escrypt_free_local(&local))
|
||||
return NULL;
|
||||
return retval;
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
escrypt_gensalt_r(uint32_t N_log2, uint32_t r, uint32_t p,
|
||||
const uint8_t * src, size_t srclen,
|
||||
@ -227,15 +211,6 @@ escrypt_gensalt_r(uint32_t N_log2, uint32_t r, uint32_t p,
|
||||
return buf;
|
||||
}
|
||||
|
||||
uint8_t *
|
||||
escrypt_gensalt(uint32_t N_log2, uint32_t r, uint32_t p,
|
||||
const uint8_t * src, size_t srclen)
|
||||
{
|
||||
static uint8_t buf[4 + 1 + 5 + 5 + BYTES2CHARS(32) + 1];
|
||||
return escrypt_gensalt_r(N_log2, r, p, src, srclen,
|
||||
buf, sizeof(buf));
|
||||
}
|
||||
|
||||
int
|
||||
crypto_scrypt(const uint8_t * passwd, size_t passwdlen,
|
||||
const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p,
|
||||
|
@ -77,15 +77,9 @@ extern uint8_t * escrypt_r(escrypt_local_t * __local,
|
||||
const uint8_t * __setting,
|
||||
uint8_t * __buf, size_t __buflen);
|
||||
|
||||
extern uint8_t * escrypt(const uint8_t * __passwd, const uint8_t * __setting);
|
||||
|
||||
extern uint8_t * escrypt_gensalt_r(
|
||||
uint32_t __N_log2, uint32_t __r, uint32_t __p,
|
||||
const uint8_t * __src, size_t __srclen,
|
||||
uint8_t * __buf, size_t __buflen);
|
||||
|
||||
extern uint8_t * escrypt_gensalt(
|
||||
uint32_t __N_log2, uint32_t __r, uint32_t __p,
|
||||
const uint8_t * __src, size_t __srclen);
|
||||
|
||||
#endif /* !_CRYPTO_SCRYPT_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user