TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest:
TYPO3\CMS\Core\Tests\UnitTestCase TYPO3\CMS\Core\Tests\BaseTestCase

Public Member Functions

 setUp ()
 
 generateHmacReturnsHashStringIfStringIsGiven ()
 
 generateHmacReturnsHashStringWhichContainsSomeSalt ()
 
 generateHmacReturnsDifferentHashStringsForDifferentInputStrings ()
 
 generateHmacThrowsExceptionIfNoStringGiven ()
 
 generatedHmacCanBeValidatedAgain ()
 
 generatedHmacWillNotBeValidatedIfHashHasBeenChanged ()
 
 appendHmacThrowsExceptionIfNoStringGiven ()
 
 appendHmacAppendsHmacToGivenString ()
 
 validateAndStripHmacThrowsExceptionIfNoStringGiven ()
 
 validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort ()
 
 validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended ()
 
 validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid ()
 
 validateAndStripHmacReturnsTheStringWithoutHmac ()
 

Protected Attributes

 $hashService
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT')
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = TRUE
 
 $backupStaticAttributes = FALSE
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 tearDown ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 getAccessibleMock ( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 getAccessibleMockForAbstractClass ( $originalClassName, array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
 
 buildAccessibleProxy ($className)
 
 callInaccessibleMethod ($object, $name)
 
 inject ($target, $name, $dependency)
 
 getUniqueId ($prefix='')
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Test case

Definition at line 20 of file HashServiceTest.php.

Member Function Documentation

◆ appendHmacAppendsHmacToGivenString()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::appendHmacAppendsHmacToGivenString ( )
Test:

Definition at line 100 of file HashServiceTest.php.

◆ appendHmacThrowsExceptionIfNoStringGiven()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::appendHmacThrowsExceptionIfNoStringGiven ( )
Test:

Definition at line 93 of file HashServiceTest.php.

◆ generatedHmacCanBeValidatedAgain()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generatedHmacCanBeValidatedAgain ( )
Test:
Author
Sebastian Kurfürst sebas.nosp@m.tian.nosp@m.@typo.nosp@m.3.or.nosp@m.g

Definition at line 73 of file HashServiceTest.php.

◆ generatedHmacWillNotBeValidatedIfHashHasBeenChanged()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generatedHmacWillNotBeValidatedIfHashHasBeenChanged ( )
Test:
Author
Sebastian Kurfürst sebas.nosp@m.tian.nosp@m.@typo.nosp@m.3.or.nosp@m.g

Definition at line 83 of file HashServiceTest.php.

◆ generateHmacReturnsDifferentHashStringsForDifferentInputStrings()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generateHmacReturnsDifferentHashStringsForDifferentInputStrings ( )
Test:
Author
Sebastian Kurfürst

Definition at line 54 of file HashServiceTest.php.

◆ generateHmacReturnsHashStringIfStringIsGiven()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generateHmacReturnsHashStringIfStringIsGiven ( )
Test:
Author
Sebastian Kurfürst

Definition at line 36 of file HashServiceTest.php.

◆ generateHmacReturnsHashStringWhichContainsSomeSalt()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generateHmacReturnsHashStringWhichContainsSomeSalt ( )
Test:
Author
Sebastian Kurfürst

Definition at line 45 of file HashServiceTest.php.

◆ generateHmacThrowsExceptionIfNoStringGiven()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::generateHmacThrowsExceptionIfNoStringGiven ( )
Test:
Author
Sebastian Kurfürst

Definition at line 65 of file HashServiceTest.php.

◆ setUp()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::setUp ( )

Definition at line 27 of file HashServiceTest.php.

References $GLOBALS.

◆ validateAndStripHmacReturnsTheStringWithoutHmac()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::validateAndStripHmacReturnsTheStringWithoutHmac ( )
Test:

Definition at line 141 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended ( )
Test:

Definition at line 126 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort ( )
Test:

Definition at line 118 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfNoStringGiven()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::validateAndStripHmacThrowsExceptionIfNoStringGiven ( )
Test:

Definition at line 110 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid()

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid ( )
Test:

Definition at line 134 of file HashServiceTest.php.

Member Data Documentation

◆ $hashService

TYPO3\CMS\Extbase\Tests\Unit\Security\Cryptography\HashServiceTest::$hashService
protected

Definition at line 25 of file HashServiceTest.php.