Fabcoin Core  0.16.2
P2P Digital Currency
Macros | Functions
crypto_scrypt-nosse.c File Reference
#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"
Include dependency graph for crypto_scrypt-nosse.c:

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...
 

Macro Definition Documentation

#define R (   a,
  b 
)    (((a) << (b)) | ((a) >> (32 - (b))))

Function Documentation

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.

Here is the call graph for this function:

Here is the caller graph for this function: