Skip to content

Instantly share code, notes, and snippets.

@vineyugave
vineyugave / gist:a6fe1d95175905cf0e69cf1fe3daec73
Created May 4, 2017 17:29 — forked from ishikawa/gist:88599
Java Sample Code for Calculating HMAC-SHA1 Signatures
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.util.Formatter;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
/**