Hashids\Hashids
Synopsis
class Hashids
{
- // constants
- const VERSION = '0.3.1';
- const MIN_ALPHABET_LENGTH = 16;
- const SEP_DIV = 3.5;
- const GUARD_DIV = 12;
- const E_ALPHABET_LENGTH = 'alphabet must contain at least %d unique characters';
- const E_ALPHABET_SPACE = 'alphabet cannot contain spaces';
- // members
- private string $_alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
- private string $_seps = 'cfhistuCFHISTU';
- private integer $_min_hash_length = 0;
- private array $_math_functions = ;
- private integer $_max_int_value = 1000000000;
- // methods
- public void __construct()
- public void encrypt()
- public void decrypt()
- public void encrypt_hex()
- public void decrypt_hex()
- public void get_max_int_value()
- private void _encode()
- private void _decode()
- private void _consistent_shuffle()
- private void _hash()
- private void _unhash()
Constants
Name | Value |
---|---|
VERSION | '0.3.1' |
MIN_ALPHABET_LENGTH | 16 |
SEP_DIV | 3.5 |
GUARD_DIV | 12 |
E_ALPHABET_LENGTH | 'alphabet must contain at least %d unique characters' |
E_ALPHABET_SPACE | 'alphabet cannot contain spaces' |
Members
private
- $_alphabet
- $_math_functions
- $_max_int_value
- $_min_hash_length
- $_seps