Exemplo n.º 1
0
 public function test_hash_hmac()
 {
     $result = Raven_Compat::hash_hmac('sha1', 'foo', 'bar');
     $this->assertEquals('85d155c55ed286a300bd1cf124de08d87e914f3a', $result);
     $result = Raven_Compat::_hash_hmac('sha1', 'foo', 'bar');
     $this->assertEquals('85d155c55ed286a300bd1cf124de08d87e914f3a', $result);
 }
Exemplo n.º 2
0
 /**
  * Create a signature
  */
 private function get_signature($message, $timestamp, $key)
 {
     return Raven_Compat::hash_hmac('sha1', sprintf('%F', $timestamp) . ' ' . $message, $key);
 }