TYPO3 CMS  TYPO3_7-6
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

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

Protected Member Functions

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

Protected Attributes

 $hashService
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\UnitTestCase
 $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT']
 
 $testFilesToDelete = []
 
- Protected Attributes inherited from TYPO3\CMS\Core\Tests\BaseTestCase
 $backupGlobals = true
 
 $backupStaticAttributes = false
 

Detailed Description

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 102 of file HashServiceTest.php.

◆ appendHmacThrowsExceptionIfNoStringGiven()

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

Definition at line 94 of file HashServiceTest.php.

◆ generatedHmacCanBeValidatedAgain()

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

Definition at line 73 of file HashServiceTest.php.

◆ generatedHmacWillNotBeValidatedIfHashHasBeenChanged()

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

Definition at line 83 of file HashServiceTest.php.

◆ generateHmacReturnsDifferentHashStringsForDifferentInputStrings()

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

Definition at line 54 of file HashServiceTest.php.

◆ generateHmacReturnsHashStringIfStringIsGiven()

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

Definition at line 36 of file HashServiceTest.php.

◆ generateHmacReturnsHashStringWhichContainsSomeSalt()

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

Definition at line 45 of file HashServiceTest.php.

◆ generateHmacThrowsExceptionIfNoStringGiven()

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

Definition at line 65 of file HashServiceTest.php.

◆ setUp()

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

Definition at line 27 of file HashServiceTest.php.

References $GLOBALS.

◆ validateAndStripHmacReturnsTheStringWithoutHmac()

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

Definition at line 148 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended()

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

Definition at line 131 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort()

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

Definition at line 122 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfNoStringGiven()

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

Definition at line 113 of file HashServiceTest.php.

◆ validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid()

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

Definition at line 140 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.