crypt-port.h 854 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* Copyright (C) 2020 Steffen Jaeckel <jaeckel-floss@eyet-services.de> */
  3. #include <linux/types.h>
  4. #include <vsprintf.h>
  5. #define NO_GENSALT
  6. #define CRYPT_OUTPUT_SIZE 384
  7. #define ALG_SPECIFIC_SIZE 8192
  8. #define ARG_UNUSED(x) (x)
  9. #define static_assert(a, b) _Static_assert(a, b)
  10. #define strtoul(cp, endp, base) simple_strtoul(cp, endp, base)
  11. extern const unsigned char ascii64[65];
  12. #define b64t ((const char *)ascii64)
  13. void crypt_sha256crypt_rn(const char *phrase, size_t phr_size,
  14. const char *setting, size_t ARG_UNUSED(set_size),
  15. uint8_t *output, size_t out_size, void *scratch,
  16. size_t scr_size);
  17. void crypt_sha512crypt_rn(const char *phrase, size_t phr_size,
  18. const char *setting, size_t ARG_UNUSED(set_size),
  19. uint8_t *output, size_t out_size, void *scratch,
  20. size_t scr_size);