getValidationKey() публичный Метод

public getValidationKey ( ) : string
Результат string the private key used to generate HMAC. If the key is not explicitly set, a random one is generated and returned.
Пример #1
0
 public function testValidationKey()
 {
     $sec = new TSecurityManager();
     $sec->init(null);
     // Random validation key
     $valkey = $sec->getValidationKey();
     self::assertEquals($valkey, self::$app->getGlobalState(TSecurityManager::STATE_VALIDATION_KEY));
     $sec->setValidationKey('aKey');
     self::assertEquals('aKey', $sec->getValidationKey());
     try {
         $sec->setValidationKey('');
         self::fail('Expected TInvalidDataValueException not thrown');
     } catch (TInvalidDataValueException $e) {
     }
 }