コード例 #1
0
ファイル: HashServiceTest.php プロジェクト: nxpthx/FLOW3
 /**
  * @test
  */
 public function validateAndStripHmacReturnsTheStringWithoutHmac()
 {
     $string = ' Some arbitrary string with special characters: öäüß!"§$ ';
     $hashedString = $this->hashService->appendHmac($string);
     $actualResult = $this->hashService->validateAndStripHmac($hashedString);
     $this->assertSame($string, $actualResult);
 }
コード例 #2
0
 /**
  * Serialize and hash the form field array
  *
  * @param array $formFieldArray form field array to be serialized and hashed
  * @return string Hash
  */
 protected function serializeAndHashFormFieldArray($formFieldArray)
 {
     $serializedFormFieldArray = serialize($formFieldArray);
     return $this->hashService->appendHmac($serializedFormFieldArray);
 }