public function testHmacRIPEMD160_7() { $data = 'Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data'; $key = str_repeat("ª", 80); $hmac = HMAC::compute($key, 'RIPEMD160', $data); $this->assertEquals('69ea60798d71616cce5fd0871e23754cd75d5a0a', $hmac); }
/** * Sign a request * * @param array $params * @param mixed $method * @param mixed $url * @return string */ public function sign(array $params, $method = null, $url = null) { $binaryHash = HMACEncryption::compute($this->_key, $this->_hashAlgorithm, $this->_getBaseSignatureString($params, $method, $url), HMACEncryption::BINARY); return base64_encode($binaryHash); }