public function testValidateData()
{
$sec = new TSecurityManager();
$sec->init(null);
$sec->setValidationKey('aKey');
$sec->setValidation('SHA1');
$hashed = $sec->hashData('A text to hash');
self::assertEquals('A text to hash', $sec->validateData($hashed));
// try to alter the hashed data
$hashed[45] = "z";
self::assertFalse($sec->validateData($hashed));
// and a test without tampered data
self::assertFalse($sec->validateData('bad'));
}