class SignatureUtils {

    public static String sign(String metadata, String key) throws SecurityException {
        try {
            return sign(metadata.getBytes(), key);
        } catch (Exception e) {
            throw new SecurityException("Failed to generate HMAC : " + e.getMessage(), e);
        }
    }

}