PHP Classes

PHP Password Hash Generator: Generate password, salt and hash for the password

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2023-04-14 (11 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 71 All time: 10,229 This week: 571Up
Version License PHP version Categories
pass-hash-generator 1.0.0The PHP License5Cryptography
Description 

Author

This package can generate a password, salt, and hash for the password.

It can generate a password string with a given length of random letters, digits, and punctuation characters and returns a sha256 hash.

The class uses a salt of a given length value made of random byte values.

Picture of Boss Ibrahim Mussa
  Performance   Level  
Name: Boss Ibrahim Mussa <contact>
Classes: 13 packages by
Country: Congo Congo
Age: ???
All time rank: 29051 in Congo Congo
Week rank: 106 Up1 in Congo Congo Equal
Innovation award
Innovation award
Nominee: 5x

Example

<?php

include __DIR__.'/../vendor/autoload.php';
use
Wepesi\App\PasswordGenerator;

$simple_string = PasswordGenerator::randomString();
$strong_string = PasswordGenerator::randomString(10,true);

echo
$simple_string . PHP_EOL;
echo
$strong_string . PHP_EOL;
//eg: Lfw8oPDUhl
//eg: N[:Lspg+Lw

$salt = PasswordGenerator::salt();
echo
$salt . PHP_EOL;
// eg: 505ff561ca2a0d846e5713b6b00f6b38

$simple_string_no_salt = PasswordGenerator::make($simple_string);
echo
$simple_string_no_salt . PHP_EOL;
// eg: 1fbbd6ad4db19d296e6d9680f28829fbb23bb63b6447f8ace9596ce258a073ed

$simple_string_salt = PasswordGenerator::make($simple_string,$salt);
echo
$simple_string_salt . PHP_EOL;
// eg: 8553b800cd2dcd2646c7535e8675c7892872edf508440e268c9017fd15dbc93a


Details

PASSWORD_GENERATOR

auto generate password, salt and hash.

Installation

composer require password-generator

Integration

$simple_string = PasswordGenerator::randomString();
$strong_string = PasswordGenerator::randomString(10,true);

echo $simple_string . PHP_EOL;
echo $strong_string . PHP_EOL;
//eg: Lfw8oPDUhl 
//eg: N[:Lspg+Lw

$salt = PasswordGenerator::salt();
echo $salt . PHP_EOL;
// eg: 505ff561ca2a0d846e5713b6b00f6b38

$simple_string_no_salt = PasswordGenerator::make($simple_string);
echo $simple_string_no_salt . PHP_EOL;
// eg: 1fbbd6ad4db19d296e6d9680f28829fbb23bb63b6447f8ace9596ce258a073ed

$simple_string_salt = PasswordGenerator::make($simple_string,$salt);
echo $simple_string_salt . PHP_EOL;
// eg: 8553b800cd2dcd2646c7535e8675c7892872edf508440e268c9017fd15dbc93a

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imageexample (1 file)
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file php.yml Data Auxiliary data

  Files folder image Files  /  example  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  src  
File Role Description
  Plain text file PasswordGenerator.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:71
This week:0
All time:10,229
This week:571Up