php_crypt_r.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* $Id$ */
  2. /*
  3. +----------------------------------------------------------------------+
  4. | PHP Version 5 |
  5. +----------------------------------------------------------------------+
  6. | Copyright (c) 1997-2016 The PHP Group |
  7. +----------------------------------------------------------------------+
  8. | This source file is subject to version 3.01 of the PHP license, |
  9. | that is bundled with this package in the file LICENSE, and is |
  10. | available through the world-wide-web at the following url: |
  11. | http://www.php.net/license/3_01.txt |
  12. | If you did not receive a copy of the PHP license and are unable to |
  13. | obtain it through the world-wide-web, please send a note to |
  14. | license@php.net so we can mail you a copy immediately. |
  15. +----------------------------------------------------------------------+
  16. | Authors: Pierre Alain Joye <pajoye@php.net |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef _CRYPT_WIHN32_H_
  20. #define _CRYPT_WIHN32_H_
  21. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. #include "crypt_freesec.h"
  26. #ifndef __const
  27. #ifdef __GNUC__
  28. #define __CONST __const
  29. #else
  30. #define __CONST
  31. #endif
  32. #else
  33. #define __CONST __const
  34. #endif
  35. void php_init_crypt_r();
  36. void php_shutdown_crypt_r();
  37. extern void _crypt_extended_init_r(void);
  38. /*PHPAPI char* crypt(const char *key, const char *salt);*/
  39. PHPAPI char *php_crypt_r (const char *__key, const char *__salt, struct php_crypt_extended_data * __data);
  40. #define MD5_HASH_MAX_LEN 120
  41. #include "crypt_blowfish.h"
  42. extern char * php_md5_crypt_r(const char *pw, const char *salt, char *out);
  43. extern char * php_sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
  44. extern char * php_sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif /* _CRYPT_WIHN32_H_ */