src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
private function _sign($data, $key, $algorithm)
    {
        if ($algorithm === 'HmacSHA1') {
            $hash = 'sha1';
        } else if ($algorithm === 'HmacSHA256') {
            $hash = 'sha256';
        } else {
            throw new Exception ("Non-supported signing method specified");
        }
        return base64_encode(
            hash_hmac($hash, $data, $key, true)
        );
    }
private function _sign($data, $key, $algorithm)
    {
        if ($algorithm === 'HmacSHA1') {
            $hash = 'sha1';
        } else if ($algorithm === 'HmacSHA256') {
            $hash = 'sha256';
        } else {
            throw new Exception ("Non-supported signing method specified");
        }
        return base64_encode(
            hash_hmac($hash, $data, $key, true)
        );
    }
private function _sign ( $ data , $ key , $ algorithm ) { if ( $ algorithm === 'HmacSHA1' ) { $ hash = 'sha1' ; } else if ( $ algorithm === 'HmacSHA256' ) { $ hash = 'sha256' ; } else { throw new Exception ( "Non-supported signing method specified" ) ; } return base64_encode ( hash_hmac ( $ hash , $ data , $ key , true ) ) ; }
Computes RFC 2104-compliant HMAC signature.
Computes RFC 2104 - compliant HMAC signature .