ValidationHash
class ValidationHash (View source)
Methods
                    static string
                
                
                    generate(int $len = 64)
        
                                            
                
            Generates a random string.
                    static 
                
                
                    removeExpired(int $type)
        
                                            
                
            Removes old entries for the supplied type.
                    static string
                
                
                    add(int $uID, int $type, bool $singeHashAllowed = false, int $hashLength = 64)
        
                                            
                
            Adds a hash to the lookup table for a user and type, removes any other existing hashes for the same user and type.
                    static int
                
                
                    getUserID(string $hash, int $type)
        
                                            
                
            Gets the users id for a given hash and type.
                    static int
                
                
                    getType(string $hash)
        
                                            
                
            Gets the hash type for a given hash.
                    static bool
                
                
                    isValid($hash)
        
                                            
                
            Validate the given hash
Details
        
                static    protected        string
    generate(int $len = 64)
        
    
    Generates a random string.
        
                static    protected        
    removeExpired(int $type)
        
    
    Removes old entries for the supplied type.
        
                static            string
    add(int $uID, int $type, bool $singeHashAllowed = false, int $hashLength = 64)
        
    
    Adds a hash to the lookup table for a user and type, removes any other existing hashes for the same user and type.
        
                static            int
    getUserID(string $hash, int $type)
        
    
    Gets the users id for a given hash and type.
        
                static            int
    getType(string $hash)
        
    
    Gets the hash type for a given hash.
        
                static            bool
    isValid($hash)
        
    
    Validate the given hash