File: kdf.h

package info (click to toggle)
lastpass-cli 1.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 912 kB
  • sloc: ansic: 10,203; sh: 683; makefile: 45
file content (14 lines) | stat: -rw-r--r-- 423 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef KDF_H
#define KDF_H

#include <sys/types.h>
#include <openssl/sha.h>

#define KDF_HASH_LEN SHA256_DIGEST_LENGTH
#define KDF_HEX_LEN (KDF_HASH_LEN * 2 + 1)
#define MINIMUM_ITERATIONS 2

void kdf_login_key(const char *username, const char *password, int iterations, char hex[KDF_HEX_LEN]);
void kdf_decryption_key(const char *username, const char *password, int iterations, unsigned char hash[KDF_HASH_LEN]);

#endif