juntals01/phpass

Laravel package for phpass

dev-main 2020-11-12 05:16 UTC

This package is auto-updated.

Last update: 2025-06-12 15:59:02 UTC


README

Description

This is a laravel extension of Portable PHP password hashing framework by Openwall. http://www.openwall.com/phpass/ to further check the functionalities.

How to use

  • Include in your file
composer require juntals01/phpass

then, in your php file include by;

use Juntals01\Phpass\PhpassHelper;

function

passwordHash

returns instance of phpass openwall library with parameter Iteration, portablehashes.

  • Iteration count: 8
  • portablehashes: true
PhpassHelper::passwordHash()

passwordVerify

returns true if plaintext is the hash equivalent or false if not

PhpassHelper::passwordVerify($plainText, $hash)

hash

hash a plain text. First parameter is plain text. Second is legacy compatibility with a default value "true".

PhpassHelper::hash($plainText)
PhpassHelper::hash($plainText, $legacyCompatibility = true)