protected function calculateHash($rawData) { ksort($rawData); $buffer = ''; foreach ($rawData as $key => $value) { $buffer .= strlen($value) . $value; } return hash_hmac('md5', $buffer, $this->configuration->getSecretKey()); }
public function testSetSecretKey() { $this->configuration->setSecretKey('TestSecretKeySetter'); $this->assertEquals('TestSecretKeySetter', $this->configuration->getSecretKey()); }