crypto_pwbox.h 552 B

1234567891011121314151617181920
  1. #ifndef CRYPTO_PWBOX_H_INCLUDED_
  2. #define CRYPTO_PWBOX_H_INCLUDED_
  3. #include "torint.h"
  4. #define UNPWBOX_OKAY 0
  5. #define UNPWBOX_BAD_SECRET -1
  6. #define UNPWBOX_CORRUPTED -2
  7. int crypto_pwbox(uint8_t **out, size_t *outlen_out,
  8. const uint8_t *inp, size_t input_len,
  9. const char *secret, size_t secret_len,
  10. unsigned s2k_flags);
  11. int crypto_unpwbox(uint8_t **out, size_t *outlen_out,
  12. const uint8_t *inp, size_t input_len,
  13. const char *secret, size_t secret_len);
  14. #endif