RandomGenerator
class RandomGenerator (View source)
Generates entropy values based on strongest available methods (mcrypt_create_iv(), openssl_random_pseudo_bytes(), /dev/urandom, COM.CAPICOM.Utilities.1, mt_rand()).
Chosen method depends on operating system and PHP version.
Methods
Note: Returned values are not guaranteed to be crypto-safe, depending on the used retrieval method.
Generates a random token that can be used for session IDs, CSRF tokens etc., based on hash algorithms.
Details
        
                            string
    generateEntropy()
        
    
    Note: Returned values are not guaranteed to be crypto-safe, depending on the used retrieval method.
        
                            string
    randomToken(string $algorithm = 'whirlpool')
        
    
    Generates a random token that can be used for session IDs, CSRF tokens etc., based on hash algorithms.
If you are using it as a password equivalent (e.g. autologin token) do NOT store it in the database as a plain text but encrypt it with Member::encryptWithUserSettings.
        
                            
    generateHash($algorithm = 'whirlpool')
        deprecated
    
    deprecated
No description