Skip to content

Instantly share code, notes, and snippets.

View RemyPorter's full-sized avatar

Remy Porter RemyPorter

View GitHub Profile
@h3xx
h3xx / AuthUtility.php
Last active August 29, 2015 14:19
Bad Code for generating a "random" password
/**
* Generate a random alphanumeric password
* precondition: len must be <= 32
* param len: length of the random password
* param enforce_rules: enforce password security rules
* returns: the random password
**/
public static function generateRandomPassword($len=8, $enforce_rules = false)
{
$count = 0;