Code example for SignatureException

0
			Mac mac = Mac.getInstance(HMAC_SHA1_ALGORITHM);
			mac.init(key);
			byte[] rawHmac = mac.doFinal(baseString.getBytes());
			return Base64.encode(rawHmac);
		} catch (Exception e) {
			throw new SignatureException("Failed to generate HMAC : " + e.getMessage());
		} 
	} 
 
	/** 
	 * Generates a secure random hexadecimal string using SHA1 PRNG and digest 
	 *  
	 * @return Random hexadecimal encoded String 
	 * @throws Exception 
	 */ 
	public static String generateUUID() throws Exception {
 
		try { 
			// SHA1 Pseudo Random Number Generator 
			SecureRandom prng = SecureRandom.getInstance("SHA1PRNG");
Connect your IDE to all the code out there  Get Codota for Java