@Test
    void testHashing() throws Exception {
        byte[] hash1 = MessageDigest.getInstance("SHA-256").digest(message);
        byte[] hash2 = sha256Digest(() -> new ByteArrayInputStream(message));
        DigestInputStream digester = sha256Digester(new ByteArrayInputStream(message));
        digester.readAllBytes();
        byte[] hash3 = digester.getMessageDigest().digest();

        assertArrayEquals(hash1, hash2);
        assertArrayEquals(hash1, hash3);
    }
Tests that messages can be signed and verified, and that the keys used for this can be parsed.

To generate appropriate keys, run the following commands:
<ol>
<li>{@code openssl ecparam -name prime256v1 -genkey -noout -out private_key.pem}</li>
<li>{@code openssl ec -pubout -in private_key.pem -out public_key.pem}</li>
</ol>
Step 1 generates a private key and Step 2 extracts and writes the public key to a separate file.

@author jonmv
hosted-api/src/test/java/ai/vespa/hosted/api/SignaturesTest.java