// Path: src/main/java/com/cardinity/Cardinity.java
// public abstract class Cardinity {
// 
//     public static final String API_BASE = "https://api.cardinity.com";
//     public static final String API_VERSION = "v1";
//     public static final String VERSION = "0.1";
//     public static final String ENCODING_CHARSET = "UTF-8";
// 
// }


import com.cardinity.Cardinity;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;
package com.cardinity.oauth;



public class HmacOAuthSigner implements OAuthSigner {

    @Override
    public String getSignatureMethod() {
        return "HMAC-SHA1";
    }

    @Override
    public String computeSignature(String signatureBaseString, String consumerSecret) throws
            GeneralSecurityException, UnsupportedEncodingException {

        String key = OAuthUtils.percentEncode(consumerSecret) + "&";
// Path: src/main/java/com/cardinity/Cardinity.java
// public abstract class Cardinity {
// 
//     public static final String API_BASE = "https://api.cardinity.com";
//     public static final String API_VERSION = "v1";
//     public static final String VERSION = "0.1";
//     public static final String ENCODING_CHARSET = "UTF-8";
// 
// }


// Path: src/main/java/com/cardinity/oauth/HmacOAuthSigner.java
import com.cardinity.Cardinity;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import javax.xml.bind.DatatypeConverter;
import java.io.UnsupportedEncodingException;
import java.security.GeneralSecurityException;

package com.cardinity.oauth;



public class HmacOAuthSigner implements OAuthSigner {

    @Override
    public String getSignatureMethod() {
        return "HMAC-SHA1";
    }

    @Override
    public String computeSignature(String signatureBaseString, String consumerSecret) throws
            GeneralSecurityException, UnsupportedEncodingException {

        String key = OAuthUtils.percentEncode(consumerSecret) + "&";
        SecretKey secretKey = new SecretKeySpec(key.getBytes(Cardinity.ENCODING_CHARSET), "HmacSHA1");