public static DigestInputStream sha256Digester(InputStream in) {
        try {
            return new DigestInputStream(in, MessageDigest.getInstance("SHA-256"));
        }
        catch (NoSuchAlgorithmException e) {
            throw new IllegalStateException(e);
        }
    }
Wraps the given input stream in a digester which computes a SHA 256 hash of the contents read through it.
hosted-api/src/main/java/ai/vespa/hosted/api/Signatures.java