1
0

StonePhpSafeCrypt_config.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. /////////
  3. //
  4. // Stone PHP SafeCrypt configuration file
  5. // --------------------------------------
  6. //
  7. // You must set the default MD5 salt. Everything else is optional.
  8. //////////////////////////////
  9. ////////// REQUIRED //////////
  10. //////////////////////////////
  11. /////////
  12. //
  13. // Default MD5 Salt
  14. //
  15. // Fill this string with pretty much whatever. A phrase, random letters,
  16. // it really doesn't matter. This is a 'salt,' which is a technique used
  17. // to defeat dictionary attacks. Changing the salt will break all of your
  18. // previous keys until the salt is changed back, so if you're expecting to
  19. // change this as a response to attacks, it's probably better to input this
  20. // in the options from the containing application than to leave it in
  21. // defaults. It *must* be set in defaults, though, because a lack of a
  22. // salt is an unacceptable security risk.
  23. //
  24. // The actual contents of the salt don't matter, other than that they are
  25. // a string. You would do well to just slap your hands against the
  26. // keyboard for a while.
  27. //
  28. // For obvious reasons, be careful to escape backslashes and quote marks
  29. // according to PHP rules. Or, avoid them entirely. Doesn't matter.
  30. define('DEFAULT_MD5_SALT', $net2ftp_settings["md5_salt"]); // empty string is illegal
  31. // examples:
  32. //
  33. // define('DEFAULT_MD5_SALT', 'l^3-40#9a+40bn_qr:0b/8n<0b}qrq SPAM SPAM SPAM EGGS AND SPAM');
  34. // define('DEFAULT_MD5_SALT', 'I am the very model of a modern Major General');
  35. // define('DEFAULT_MD5_SALT', 'For a good time, call 867-5309');
  36. // define('DEFAULT_MD5_SALT', '1,3,7-trimethyl-1H-purine-2,6(3H,7H)-dione');
  37. //////////////////////////////
  38. ////////// OPTIONAL //////////
  39. //////////////////////////////
  40. // TODO add DEFAULT_INCLUDE_DIRECTORY
  41. /////////
  42. //
  43. // DEFAULT_ENCRYPTION_METHOD
  44. // -------------------------
  45. // default: '' (auto-detect)
  46. //
  47. // TripleDES is reasonable speed, reasonable security and available in
  48. // most countries. Set this to false if you want the library to try to
  49. // autodetect the best available algorithm.
  50. //
  51. // TODO actually make the autodetection, also get rid of tripledes
  52. define('DEFAULT_ENCRYPTION_METHOD', 'twofish');
  53. /////////
  54. //
  55. // DEFAULT_ENCRYPTION_MODE
  56. // -----------------------
  57. // default: 'cbc'
  58. //
  59. // TODO write description
  60. // TODO ofb is badbear. test with CBC soon.
  61. define('DEFAULT_ENCRYPTION_MODE', 'cbc');
  62. /////////
  63. //
  64. // DEFAULT_ALGORITHM_DIRECTORY
  65. // ---------------------------
  66. // default: '' (auto-detect)
  67. //
  68. // On most machines, this should stay empty. This allows you to override
  69. // the directory in which the compressors and decompressors will be looked
  70. // for. PHP defaults for this are almost always correct, and should rarely
  71. // be overridden. Fill only if you have specific reason to do so.
  72. define('DEFAULT_ALGORITHM_DIRECTORY', '');
  73. /////////
  74. //
  75. // DEFAULT_MODE_DIRECTORY
  76. // ----------------------
  77. // default: '' (auto-detect)
  78. //
  79. // As above, but for block modes instead of compressors. Again, fill only
  80. // if you have a specific reason to do so.
  81. define('DEFAULT_MODE_DIRECTORY', '');
  82. /////////
  83. //
  84. // DEFAULT_COMPRESSION_METHOD
  85. // --------------------------
  86. // default: false
  87. //
  88. // Here, you may set the library to compress by default when encrypting.
  89. // Whether this is desirable has a lot to do with whether your server is
  90. // already compressing somewhere else, whether you can afford the CPU time,
  91. // whether the space is important, and so on. I leave this off by default
  92. // because you can turn it on during use, but if you always use it, hell,
  93. // just set it here.
  94. //
  95. // Standard values are [ 'gz' , 'gz_deflate' , 'bz' , false ].
  96. //
  97. // User may add new values in StonePhpSafeCrypt_compressors.php .
  98. //
  99. // A value of false skips default compression, which is probably best.
  100. define('DEFAULT_COMPRESSION_METHOD', false);
  101. ?>