Skip to content

Instantly share code, notes, and snippets.

On vacation

Fendi Septiawan fendiseptiawan0709

On vacation
Block or report user

Report or block fendiseptiawan0709

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fendiseptiawan0709 / cryptographically_secure_random_strings.php
Created Oct 22, 2018 — forked from raveren/cryptographically_secure_random_strings.php
Generate cryptographically secure random strings. Based on Kohana's Text::random() method and this answer:
View cryptographically_secure_random_strings.php
function random_text( $type = 'alnum', $length = 8 )
switch ( $type ) {
case 'alnum':
$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
case 'alpha':
$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
case 'hexdec':
You can’t perform that action at this time.