ow-crypt.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Written by Solar Designer <solar at openwall.com> in 2000-2011.
  3. * No copyright is claimed, and the software is hereby placed in the public
  4. * domain. In case this attempt to disclaim copyright and place the software
  5. * in the public domain is deemed null and void, then the software is
  6. * Copyright (c) 2000-2011 Solar Designer and it is hereby released to the
  7. * general public under the following terms:
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted.
  11. *
  12. * There's ABSOLUTELY NO WARRANTY, express or implied.
  13. *
  14. * See crypt_blowfish.c for more information.
  15. */
  16. #ifndef _OW_CRYPT_H
  17. #define _OW_CRYPT_H
  18. #ifndef __GNUC__
  19. #undef __const
  20. #define __const const
  21. #endif
  22. #ifndef __SKIP_GNU
  23. extern char *crypt(__const char *key, __const char *setting);
  24. extern char *crypt_r(__const char *key, __const char *setting, void *data);
  25. #endif
  26. #ifndef __SKIP_OW
  27. extern char *crypt_rn(__const char *key, __const char *setting,
  28. void *data, int size);
  29. extern char *crypt_ra(__const char *key, __const char *setting,
  30. void **data, int *size);
  31. extern char *crypt_gensalt(__const char *prefix, unsigned long count,
  32. __const char *input, int size);
  33. extern char *crypt_gensalt_rn(__const char *prefix, unsigned long count,
  34. __const char *input, int size, char *output, int output_size);
  35. extern char *crypt_gensalt_ra(__const char *prefix, unsigned long count,
  36. __const char *input, int size);
  37. #endif
  38. #endif