File: includes.h

package info (click to toggle)
ruby-bcrypt-pbkdf 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 200 kB
  • sloc: ansic: 1,062; ruby: 72; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 655 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef bcrypt_pbkdf_include_h
#define bcrypt_pbkdf_include_h

#include <stdint.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>

#if defined(_WIN32) || (defined(__sun) && defined(__SVR4))

typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;

#endif

#include "blf.h"

void explicit_bzero(void *p, size_t n);
int bcrypt_pbkdf(const char *pass, size_t passlen, const uint8_t *salt, size_t saltlen,
    uint8_t *key, size_t keylen, unsigned int rounds);
void bcrypt_hash(const uint8_t *sha2pass, const uint8_t *sha2salt, uint8_t *out);

#define BCRYPT_WORDS 8
#define BCRYPT_HASHSIZE (BCRYPT_WORDS * 4)

#endif