Crypto.class.php 393 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Tools {
  3. /**
  4. *
  5. */
  6. class Crypto {
  7. /**
  8. *
  9. */
  10. public static function getHashPassword($clearPassword) {
  11. return password_hash($clearPassword, PASSWORD_BCRYPT);
  12. }
  13. /**
  14. *
  15. */
  16. public static function verify($clearPassword, $hash) {
  17. return password_verify($clearPassword, $hash);
  18. }
  19. }
  20. }
  21. ?>