- Symphony 2.5.3
-
› assets
14 -
› boot
13 -
› core
23 -
› cryptography
4 -
› data-sources
0 -
› email-gateways
3 -
› events
3 -
› global
44 -
› interface
8 -
› toolkit
71 - Delegates91
- Deprecated14
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
Cryptography PBKDF2
public class PBKDF2 extends Cryptography
class.pbkdf2.php #13PBKDF2 is a cryptography class for hashing and comparing messages using the PBKDF2-Algorithm with salting. This is the most advanced hashing algorithm Symphony provides.
Constants
static str ALGORITHM = 'sha256'
Algorithm to be used
static int ITERATIONS = 10000
Key length
static int KEY_LENGTH = 40
Key length
static str PREFIX = 'PBKDF2v1'
Prefix to identify the algorithm used
static int SALT_LENGTH = 20
Salt length
Methods
static boolean compare(
$input, $hash, $isHash)
Compares a given hash with a cleantext password. Also extracts the salt from the hash.
Parameters
Returns
the result of the comparison
See Also
static string extractHash(
$input)
Extracts the hash from a hash/salt-combination
Parameters
Returns
the hash
static integer extractIterations(
$input)
Extracts the number of iterations from a hash/salt-combination
Parameters
Returns
the number of iterations
static string extractSalt(
$input)
Extracts the salt from a hash/salt-combination
Parameters
Returns
the salt
static integer extractSaltlength(
$input)
Extracts the saltlength from a hash/salt-combination
Parameters
Returns
the saltlength
static string hash(
$input, $salt, $iterations, $keylength)
Uses PBKDF2
and random salt generation to create a hash based on some input.
Original implementation was under public domain, taken from
http://www.itnewb.com/tutorial/Encrypting-Passwords-with-PHP-for-Storage-Using-the-RSA-PBKDF2-Standard
Parameters
Returns
the hashed string
See Also
static boolean requiresMigration(
$hash)
Checks if provided hash has been computed by most recent algorithm returns true if otherwise
Parameters
Returns
whether the hash should be re-computed