11 #if defined(HAVE_CONFIG_H)
18 static const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63;
29 #define scrypt_1024_1_1_256_sp(input, output, scratchpad) scrypt_1024_1_1_256_sp_detected((input), (output), (scratchpad))
32 void scrypt_detect_sse2();
34 extern void (*scrypt_1024_1_1_256_sp_detected)(
const char *input,
char *output,
char *scratchpad);
36 #define scrypt_1024_1_1_256_sp(input, output, scratchpad) scrypt_1024_1_1_256_sp_generic((input), (output), (scratchpad))
40 PBKDF2_SHA256(
const uint8_t *passwd,
size_t passwdlen,
const uint8_t *salt,
41 size_t saltlen, uint64_t c, uint8_t *buf,
size_t dkLen);
43 static inline uint32_t le32dec(
const void *pp)
45 const uint8_t *p = (uint8_t
const *)pp;
46 return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
47 ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
50 static inline void le32enc(
void *pp, uint32_t x)
52 uint8_t *p = (uint8_t *)pp;
54 p[1] = (x >> 8) & 0xff;
55 p[2] = (x >> 16) & 0xff;
56 p[3] = (x >> 24) & 0xff;
void scrypt_1024_1_1_256_sp_generic(const char *input, char *output, char *scratchpad)
void PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen)
PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen): Compute PBKDF2(passwd, salt, c, dkLen) using HMAC-SHA256 as the PRF, and write the output to buf.
void scrypt_1024_1_1_256_sp_sse2(const char *input, char *output, char *scratchpad)
void scrypt_1024_1_1_256(const char *input, char *output)