Prado\Security\TSecurityManager::getValidation PHP Méthode

getValidation() public méthode

Please use {@link getHashAlgorithm()} instead.
public getValidation ( ) : string
Résultat string hashing algorithm used to generate HMAC. Defaults to 'sha1'.
    public function getValidation()
    {
        return $this->_hashAlgorithm;
    }

Usage Example

 public function testValidation()
 {
     $sec = new TSecurityManager();
     $sec->init(null);
     $sec->setValidation('MD5');
     self::assertEquals('MD5', $sec->getValidation());
     $sec->setValidation('SHA1');
     self::assertEquals('SHA1', $sec->getValidation());
     try {
         $sec->setValidation('BAD');
         self::fail('Expected TInvalidDataValueException not thrown');
     } catch (TInvalidDataValueException $e) {
     }
 }