PageRenderTime 45ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/phpmyfaq/inc/Enc/Md5.php

http://github.com/thorsten/phpMyFAQ
PHP | 48 lines | 11 code | 3 blank | 34 comment | 1 complexity | 145793feb3f40ccb72b4ea189632b154 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, LGPL-2.1, LGPL-3.0
  1. <?php
  2. /**
  3. * Provides methods for password encryption using md5().
  4. *
  5. * PHP Version 5.3
  6. *
  7. * This Source Code Form is subject to the terms of the Mozilla Public License,
  8. * v. 2.0. If a copy of the MPL was not distributed with this file, You can
  9. * obtain one at http://mozilla.org/MPL/2.0/.
  10. *
  11. * @category phpMyFAQ
  12. * @package Enc
  13. * @author Lars Tiedemann <php@larstiedemann.de>
  14. * @copyright 2005-2012 phpMyFAQ Team
  15. * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
  16. * @link http://www.phpmyfaq.de
  17. * @since 2005-09-18
  18. */
  19. if (!defined('IS_VALID_PHPMYFAQ')) {
  20. exit();
  21. }
  22. /**
  23. * PMF_Enc_Md5
  24. *
  25. * @category phpMyFAQ
  26. * @package Enc
  27. * @author Lars Tiedemann <php@larstiedemann.de>
  28. * @copyright 2005-2012 phpMyFAQ Team
  29. * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
  30. * @link http://www.phpmyfaq.de
  31. * @since 2005-09-18
  32. */
  33. class PMF_Enc_Md5 extends PMF_Enc
  34. {
  35. /**
  36. * encrypts the string str and returns the result.
  37. *
  38. * @param string $str String
  39. * @return string
  40. */
  41. public function encrypt($str)
  42. {
  43. return md5($str);
  44. }
  45. }