Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Macros | Typedefs | Functions
scrypt.cpp File Reference
#include "scrypt.h"
#include "util.h"
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <openssl/sha.h>
Include dependency graph for scrypt.cpp:

Go to the source code of this file.

Classes

struct  HMAC_SHA256Context
 

Macros

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

Typedefs

typedef struct HMAC_SHA256Context HMAC_SHA256_CTX
 

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 scrypt_1024_1_1_256_sp_generic (const char *input, char *output, char *scratchpad)
 
void scrypt_1024_1_1_256 (const char *input, char *output)
 

Macro Definition Documentation

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

Definition at line 188 of file scrypt.cpp.

Typedef Documentation

Function Documentation

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 137 of file scrypt.cpp.

void scrypt_1024_1_1_256 ( const char *  input,
char *  output 
)

Definition at line 325 of file scrypt.cpp.

void scrypt_1024_1_1_256_sp_generic ( const char *  input,
char *  output,
char *  scratchpad 
)

Definition at line 256 of file scrypt.cpp.