protected static String digest(String codec, String source) {
        try {
            MessageDigest digest = MessageDigest.getInstance(codec);
            byte[] digestBytes = digest.digest(source.getBytes(Charset.forName("UTF-8")));
            return hexlate(digestBytes, digestBytes.length);
        } catch (NoSuchAlgorithmException nsae) {
            throw new RuntimeException(codec + " codec not available");
        }
    }
Digest a string using the given codec and input

@param codec Codec to use
@param source Source to use
@return
src/main/java/com/github/instagram4j/instagram4j/utils/IGUtils.java