PHP Class WPDKCrypt

Author: =undo= ([email protected])
Inheritance: extends WPDKObject
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$__version string Override version

Public Methods

Method Description
crypt_decrypt ( string $data, string $salt, boolean $encrypt = true ) : string Simple custom crypt/decrypt with salt. Return a encrypted or decrypted string.
randomAlphaNumber ( integer $len = 8, string $extra = '#,!,.' ) : string Return a random string with alfa number characters.
uniqcode ( string $prefix = '', string $posfix = '', integer $max_length = 64 ) : string Return a $max_length char unique code (in hexdecimal) with optional prefix and postfix, keep the length at $max_length.

Method Details

crypt_decrypt() public static method

Simple custom crypt/decrypt with salt. Return a encrypted or decrypted string.
Since: 1.5.6
public static crypt_decrypt ( string $data, string $salt, boolean $encrypt = true ) : string
$data string Your data to crypt or decrypt.
$salt string Any random salt.
$encrypt boolean Optional. FALSE to decrypt. Default TRUE.
return string

randomAlphaNumber() static public method

Return a random string with alfa number characters.
static public randomAlphaNumber ( integer $len = 8, string $extra = '#,!,.' ) : string
$len integer Length of result , default 8
$extra string Extra characters, default = '#,!,.'
return string

uniqcode() public static method

Return a $max_length char unique code (in hexdecimal) with optional prefix and postfix, keep the length at $max_length.
public static uniqcode ( string $prefix = '', string $posfix = '', integer $max_length = 64 ) : string
$prefix string Optional
$posfix string Optional
$max_length integer Length of result, default 64
return string

Property Details

$__version public_oe property

Override version
public string $__version
return string