PHP Classes

File: example1.php

Recommend this page to a friend!
  Classes of Ole Aass   Secure Password Generation and Validation   example1.php   Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Basic example
Class: Secure Password Generation and Validation
Create and validate password hashes
Author: By
Last change:
Date: 11 years ago
Size: 298 bytes
 

Contents

Class file image Download
<?php

/**
 * This is as basic as it gets. The password will be hashed using the blwofish algorithm
 * with a cost of 10 and a cryptographically strong salt with strong entropy.
 */

require_once('Password.php');

$pw = new Password;
$hashed = $pw->hash('verysecret');
var_dump($hashed);