PHP Class Neos\Flow\Tests\Unit\Security\Cryptography\HashServiceTest

Inheritance: extends Neos\Flow\Tests\UnitTestCase
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$cache Neos\Cache\Frontend\StringFrontend
$hashService Neos\Flow\Security\Cryptography\HashService
$mockObjectManager Neos\Flow\ObjectManagement\ObjectManagerInterface | PHPUnit_Framework_MockObject_MockObject
$mockSettings array

Public Methods

Method Description
appendHmacAppendsHmacToGivenString ( )
appendHmacThrowsExceptionIfNoStringGiven ( )
generateHmacReturnsDifferentHashStringsForDifferentInputStrings ( )
generateHmacReturnsHashStringIfStringIsGiven ( )
generateHmacReturnsHashStringWhichContainsSomeSalt ( )
generateHmacThrowsExceptionIfNoStringGiven ( )
generatedHashCanBeValidatedAgain ( )
generatedHashReturnsAHashOf40Characters ( )
generatedHashWillNotBeValidatedIfHashHasBeenChanged ( )
hashPasswordThrowsExceptionIfNoDefaultHashingStrategyIsConfigured ( )
hashPasswordThrowsExceptionIfTheGivenHashingStrategyIsNotConfigured ( )
hashPasswordWillIncludeStrategyIdentifierInHashedPassword ( )
hashPasswordWithoutStrategyIdentifierUsesConfiguredDefaultStrategy ( )
setUp ( ) : void Set up test dependencies
validateAndStripHmacReturnsTheStringWithoutHmac ( )
validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended ( )
validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort ( )
validateAndStripHmacThrowsExceptionIfNoStringGiven ( )
validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid ( )
validatePasswordWillUseStrategyIdentifierFromHashedPassword ( )
validatePasswordWithoutStrategyIdentifierUsesDefaultStrategy ( ) test

Method Details

appendHmacAppendsHmacToGivenString() public method

appendHmacThrowsExceptionIfNoStringGiven() public method

generateHmacReturnsDifferentHashStringsForDifferentInputStrings() public method

generateHmacReturnsHashStringIfStringIsGiven() public method

generateHmacReturnsHashStringWhichContainsSomeSalt() public method

generateHmacThrowsExceptionIfNoStringGiven() public method

generatedHashCanBeValidatedAgain() public method

generatedHashReturnsAHashOf40Characters() public method

generatedHashWillNotBeValidatedIfHashHasBeenChanged() public method

hashPasswordThrowsExceptionIfNoDefaultHashingStrategyIsConfigured() public method

hashPasswordThrowsExceptionIfTheGivenHashingStrategyIsNotConfigured() public method

hashPasswordWillIncludeStrategyIdentifierInHashedPassword() public method

hashPasswordWithoutStrategyIdentifierUsesConfiguredDefaultStrategy() public method

setUp() public method

Set up test dependencies
public setUp ( ) : void
return void

validateAndStripHmacReturnsTheStringWithoutHmac() public method

validateAndStripHmacThrowsExceptionIfGivenStringHasNoHashAppended() public method

validateAndStripHmacThrowsExceptionIfGivenStringIsTooShort() public method

validateAndStripHmacThrowsExceptionIfNoStringGiven() public method

validateAndStripHmacThrowsExceptionIfTheAppendedHashIsInvalid() public method

validatePasswordWillUseStrategyIdentifierFromHashedPassword() public method

validatePasswordWithoutStrategyIdentifierUsesDefaultStrategy() public method

test

Property Details

$cache protected property

protected StringFrontend,Neos\Cache\Frontend $cache
return Neos\Cache\Frontend\StringFrontend

$hashService protected property

protected HashService,Neos\Flow\Security\Cryptography $hashService
return Neos\Flow\Security\Cryptography\HashService

$mockObjectManager protected property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement|PHPUnit_Framework_MockObject_MockObject $mockObjectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface | PHPUnit_Framework_MockObject_MockObject

$mockSettings protected property

protected array $mockSettings
return array