PIVX Core  5.6.99
P2P Digital Currency
Macros | Functions
scrypt.cpp File Reference
#include "crypto/scrypt.h"
#include "crypto/hmac_sha256.h"
#include "crypto/sha256.h"
#include "uint256.h"
#include "utilstrencodings.h"
#include <string>
#include <string.h>
#include <stdint.h>
Include dependency graph for scrypt.cpp:

Go to the source code of this file.

Macros

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

Functions

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. More...
 
void SMix (uint8_t *B, unsigned int r, unsigned int N, void *_V, void *XY)
 
void scrypt (const char *pass, unsigned int pLen, const char *salt, unsigned int sLen, char *output, unsigned int N, unsigned int r, unsigned int p, unsigned int dkLen)
 

Macro Definition Documentation

◆ R

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

Function Documentation

◆ PBKDF2_SHA256()

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.

The value dkLen must be at most 32 * (2^32 - 1).

Definition at line 60 of file scrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scrypt()

void scrypt ( const char *  pass,
unsigned int  pLen,
const char *  salt,
unsigned int  sLen,
char *  output,
unsigned int  N,
unsigned int  r,
unsigned int  p,
unsigned int  dkLen 
)

Definition at line 290 of file scrypt.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SMix()

void SMix ( uint8_t *  B,
unsigned int  r,
unsigned int  N,
void *  _V,
void *  XY 
)

Definition at line 237 of file scrypt.cpp.

Here is the caller graph for this function: