2019-03-27 12:55:47 +02:00
|
|
|
|
|
|
|
#ifndef FT_PBKDF2_H
|
|
|
|
# define FT_PBKDF2_H
|
|
|
|
|
|
|
|
#define FT_PBKDF2_RESULT 32
|
2019-03-27 01:29:06 +02:00
|
|
|
|
|
|
|
typedef struct s_hmac_sha256_ctx
|
|
|
|
{
|
|
|
|
unsigned char *key;
|
|
|
|
unsigned char *msg;
|
2019-03-27 12:55:47 +02:00
|
|
|
unsigned char out[FT_PBKDF2_RESULT];
|
2019-03-27 01:29:06 +02:00
|
|
|
unsigned int key_size;
|
|
|
|
unsigned int msg_size;
|
|
|
|
} t_hmac_sha256_ctx;
|
|
|
|
|
|
|
|
void ft_hmac_sha256_init_ctx
|
|
|
|
(
|
|
|
|
t_hmac_sha256_ctx *ctx
|
|
|
|
);
|
|
|
|
|
|
|
|
void ft_hmac_sha256
|
|
|
|
(
|
|
|
|
t_hmac_sha256_ctx *ctx
|
2019-03-27 12:55:47 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|