Component for creating HMAC tokens.  
 More...
Component for creating HMAC tokens. 
Definition at line 7 of file Hmac.php.
 
◆ __construct()
      
        
          | Elgg\Security\Hmac::__construct  | 
          ( | 
            | 
          $key,  | 
        
        
           | 
           | 
          callable  | 
          $comparator,  | 
        
        
           | 
           | 
            | 
          $data,  | 
        
        
           | 
           | 
            | 
          $algo = 'sha256'  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Constructor. 
- Parameters
 - 
  
    | string | $key | HMAC key  | 
    | callable | $comparator | Function that returns true if given two equal strings, else false  | 
    | mixed | $data | HMAC data string or serializable data  | 
    | string | $algo | Hash algorithm  | 
  
   
Definition at line 37 of file Hmac.php.
 
 
◆ getToken()
      
        
          | Elgg\Security\Hmac::getToken  | 
          ( | 
           | ) | 
           | 
        
      
 
Get the HMAC token in Base64URL encoding. 
- Returns
 - string 
 
Definition at line 55 of file Hmac.php.
 
 
◆ matchesToken()
      
        
          | Elgg\Security\Hmac::matchesToken  | 
          ( | 
            | 
          $token | ) | 
           | 
        
      
 
Does the MAC match the given token? 
- Parameters
 - 
  
    | string | $token | HMAC token in Base64URL encoding  | 
  
   
- Returns
 - bool 
 
Definition at line 66 of file Hmac.php.
 
 
The documentation for this class was generated from the following file: