2014-08-28 23:59:06 +02:00
|
|
|
#ifndef CRYPTO_PWBOX_H_INCLUDED_
|
|
|
|
#define CRYPTO_PWBOX_H_INCLUDED_
|
|
|
|
|
|
|
|
#include "torint.h"
|
|
|
|
|
|
|
|
#define UNPWBOX_OKAY 0
|
|
|
|
#define UNPWBOX_BAD_SECRET -1
|
|
|
|
#define UNPWBOX_CORRUPTED -2
|
|
|
|
|
|
|
|
int crypto_pwbox(uint8_t **out, size_t *outlen_out,
|
|
|
|
const uint8_t *inp, size_t input_len,
|
|
|
|
const char *secret, size_t secret_len,
|
|
|
|
unsigned s2k_flags);
|
|
|
|
|
|
|
|
int crypto_unpwbox(uint8_t **out, size_t *outlen_out,
|
|
|
|
const uint8_t *inp, size_t input_len,
|
|
|
|
const char *secret, size_t secret_len);
|
|
|
|
|
2017-09-15 22:24:44 +02:00
|
|
|
#endif /* !defined(CRYPTO_PWBOX_H_INCLUDED_) */
|
2014-08-28 23:59:06 +02:00
|
|
|
|