crypt.h 814 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef _CRYPT_H
  2. #define _CRYPT_H
  3. #ifdef HAVE_CONFIG_H
  4. # include "config.h"
  5. #endif
  6. #ifdef HAVE_OPENSSL_SSL_H
  7. //# include <openssl/ssl.h>
  8. # include <openssl/crypto.h>
  9. # include <openssl/aes.h>
  10. # include <openssl/sha.h>
  11. # include <openssl/md5.h>
  12. #endif /* HAVE_OPENSSL_SSL_H */
  13. #define SHA_HASH_LENGTH (SHA_DIGEST_LENGTH * 2)
  14. #define MD5_HASH_LENGTH (MD5_DIGEST_LENGTH * 2)
  15. #define md5cmp(hash, string) strcmp(hash, md5(string))
  16. #ifndef MAKING_MODS
  17. char *md5(const char *);
  18. char *encrypt_string(const char *, char *);
  19. char *decrypt_string(const char *, char *);
  20. void encrypt_pass(char *, char *);
  21. char *cryptit (char *);
  22. char *decryptit (char *);
  23. int lfprintf (FILE *, ...);
  24. void EncryptFile(char *, char *);
  25. void DecryptFile(char *, char *);
  26. #endif /* !MAKING_MODS */
  27. #endif /* !_CRYPT_H */