Skip to content

Instantly share code, notes, and snippets.

View MINORITYmaN's full-sized avatar

Stefano MINORITYmaN

  • Europe
View GitHub Profile
@MINORITYmaN
MINORITYmaN / kiss_password.php
Last active August 13, 2020 19:31
keep it simple stupid password generator function in php - read-friendly, quoted_printable safe, console safe and entropy level based password generation
<?php
function kiss_password( $entropy_level = 4, $length = 16 ) {
/** CC0 1.0 Universal License **/
/** Created: 2017 by Stefano Kocka **/
/** Purpose: Generates read-friendly, quoted_printable safe, console safe and entropy level based password **/
/** Caution: This function does not generate cryptographically secure values,
and should not be used for cryptographic purposes. **/
/** Note: If you expect short as possible output
with all 4 types of entropy then min $length=4 is recommended.
For max there is no limit. **/