@Test
    void testHash() throws NoSuchAlgorithmException {
        MessageDigest digest = MessageDigest.getInstance("SHA-256");
        digest.update("salt".getBytes(StandardCharsets.UTF_8));
        String hex1 = HexFormat.of().formatHex(digest.digest("foo".getBytes(StandardCharsets.UTF_8)));

        digest.reset();

        digest.update("salt".getBytes(StandardCharsets.UTF_8));
        String hex2 = HexFormat.of().formatHex(digest.digest("foo".getBytes(StandardCharsets.UTF_8)));

        assertThat(hex2)
                .isEqualTo(hex1);
    }
Just make sure digest resetting works.
stroom-query/stroom-query-language/src/test/java/stroom/query/language/functions/TestHash.java