2017 © Pedro Peláez
 

library randomstring

Generate random strings/passwords.

image

monodesigns/randomstring

Generate random strings/passwords.

  • Thursday, January 14, 2016
  • by monodesigns
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Randomstring

Travis License Version, (*1)

Installation

composer require monodesigns/randomstring

Usage

Randomstring is quite simple., (*2)

use monodesigns\Randomstring;

// default usage
Randomstring::generate() // 'qfaP4A'

// custom length (default = 6)
Randomstring::generate(['length' => 4]) // '9suF'

// custom types (default = 'upper lower number')
Randomstring::generate(['types' => 'upper lower']) // 'hWVHkW'

// all types (default = 'upper lower number')
Randomstring::generate(['types' => 'all']) // 'I`}dlN'

// hex
Randomstring::generate(['hex' => true]) // 'e36ad8'

// custom characters
Randomstring::generate(['custom' => '!@']) // '1pZW!Y'

Options

Randomstring::generate([
  'length' => 6,
  'types' => 'upper lower number',
  'hex' => false,
  'custom' => ''
]);

// get / set characters for different types
Randomstring::$upper
Randomstring::$lower
Randomstring::$number
Randomstring::$symbol
Randomstring::$hex

If hex is true, it overrides anything set in the types option, (*3)

The Versions

14/01 2016

dev-master

9999999-dev

Generate random strings/passwords.

  Sources   Download

DBAD license

The Development Requires

by Avatar monodesigns

22/12 2015

1.0

1.0.0.0

Generate random strings/passwords.

  Sources   Download

DBAD license

The Development Requires

by Avatar monodesigns