StonePhpSafeCrypt.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /////////
  3. //
  4. // Stone PHP SafeCrypt
  5. // -------------------
  6. //
  7. // This library is intended to wrap and distance a programmer from encryption, which is
  8. // not only difficult to use safely, but also difficult to detect flaws in. The purpose of
  9. // SafeCrypt is to provide a convenient, correct, secure and flexible wrapper for the mcrypt
  10. // library, to make encryption available at greater ease and lower risk.
  11. //
  12. // * Stone PHP SafeCrypt is genuinely free software, distributed under the Modified 3-Clause
  13. // BSD License. This library is GPL compatible. Please resist the GPL menace. Free isn't
  14. // truly free if it's only available to some. See LICENSE.TXT for details.
  15. //
  16. // * Stone PHP SafeCrypt may be used in commercial projects at no cost, without permission.
  17. // See LICENSE.TXT for details. Copyright notice must be maintained.
  18. //
  19. // * No library can substitute for a working knowledge of cryptography. See LEARNING.TXT
  20. // for resources on getting up to speed in crypto with relatively little pain.
  21. if (defined('STONE_PHP_SAFE_CRYPT_HOST_DIRECTORY')) {
  22. $basedir = STONE_PHP_SAFE_CRYPT_HOST_DIRECTORY;
  23. } else {
  24. // net2ftp
  25. $basedir = $net2ftp_globals["application_includesdir"] . "/";
  26. }
  27. /////////
  28. //
  29. // Please see USAGE.TXT for general usage instructions, or
  30. /////////
  31. //
  32. // You must set the MD5 salt in the config file before this library will function. All other
  33. // configuration is optional. testconfig checks to make sure the config is valid.
  34. require_once($basedir . 'StonePhpSafeCrypt_config.php');
  35. require_once($basedir . 'StonePhpSafeCrypt_testconfig.php');
  36. /////////
  37. //
  38. // This file sets up the compressor behavior. If you want to add a new compression method,
  39. // put the data in this file.
  40. require_once($basedir . 'StonePhpSafeCrypt_compressors.php');
  41. /////////
  42. //
  43. // Various components added here. You shouldn't need to edit these.
  44. require_once($basedir . 'StonePhpSafeCrypt_blockscramble.php');
  45. require_once($basedir . 'StonePhpSafeCrypt_packcrypt.php');
  46. // TODO add best-algorithm search using mcrypt_list_algorithms()
  47. ?>