class CoinbaseV2Digest extends BaseParamsDigest {

  private CoinbaseV2Digest(String secretKey) {
    super(secretKey, HMAC_SHA_256);
  }

  public static CoinbaseV2Digest createInstance(String secretKey) {
    return secretKey == null ? null : new CoinbaseV2Digest(secretKey);
  }

  @Override
  public String digestParams(RestInvocation restInvocation) {<FILL_FUNCTION_BODY>}
}

    final String pathWithQueryString =
        restInvocation.getInvocationUrl().replace(restInvocation.getBaseUrl(), "");
    final String timestamp =
        restInvocation.getParamValue(HeaderParam.class, CB_ACCESS_TIMESTAMP).toString();
    final String message = timestamp + restInvocation.getHttpMethod() + pathWithQueryString;

    return DigestUtils.bytesToHex(getMac().doFinal(message.getBytes()));
  
<methods>public javax.crypto.Mac getMac() <variables>public static final java.lang.String HMAC_MD5,public static final java.lang.String HMAC_SHA_1,public static final java.lang.String HMAC_SHA_256,public static final java.lang.String HMAC_SHA_384,public static final java.lang.String HMAC_SHA_512,private final non-sealed javax.crypto.Mac mac