modmd5.class.php 818 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of MODX Revolution.
  4. *
  5. * Copyright (c) MODX, LLC. All Rights Reserved.
  6. *
  7. * For complete copyright and license information, see the COPYRIGHT and LICENSE
  8. * files found in the top-level directory of this distribution.
  9. */
  10. /**
  11. * An MD5 implementation of modHash.
  12. *
  13. * {@inheritdoc}
  14. *
  15. * @package modx
  16. * @subpackage hashing
  17. */
  18. class modMD5 extends modHash {
  19. /**
  20. * Generate a md5 hash of the given string using the provided options.
  21. *
  22. * @param string $string A string to generate a secure hash from.
  23. * @param array $options Ignored. An array of options to be passed to the hash implementation.
  24. * @return mixed The hash result or false on failure.
  25. */
  26. public function hash($string, array $options = array()) {
  27. return md5($string);
  28. }
  29. }