Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "sha256.h"
#include "sysendian.h"
#include "libscrypt.h"
Go to the source code of this file.
Macros | |
#define | R(a, b) (((a) << (b)) | ((a) >> (32 - (b)))) |
Functions | |
int | libscrypt_scrypt (const uint8_t *passwd, size_t passwdlen, const uint8_t *salt, size_t saltlen, uint64_t N, uint32_t r, uint32_t p, uint8_t *buf, size_t buflen) |
crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): Compute scrypt(passwd[0 . More... | |
int libscrypt_scrypt | ( | const uint8_t * | passwd, |
size_t | passwdlen, | ||
const uint8_t * | salt, | ||
size_t | saltlen, | ||
uint64_t | N, | ||
uint32_t | r, | ||
uint32_t | p, | ||
uint8_t * | buf, | ||
size_t | buflen | ||
) |
crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): Compute scrypt(passwd[0 .
. passwdlen - 1], salt[0 .. saltlen - 1], N, r, p, buflen) and write the result into buf. The parameters r, p, and buflen must satisfy r * p < 2^30 and buflen <= (2^32 - 1) * 32. The parameter N must be a power of 2 greater than 1.
Return 0 on success; or -1 on error
Definition at line 234 of file crypto_scrypt-nosse.c.