class ChunkHasher {

    public ChunkHash computeHash(byte[] plaintext) throws InvalidKeyException {
        try {
            Mac mac = Mac.getInstance(MAC_ALGORITHM);
            mac.init(mSecretKey);
            return new ChunkHash(mac.doFinal(plaintext));
        } catch (NoSuchAlgorithmException e) {
            // This can not happen - AES/GCM/NoPadding is available as part of the framework.
            throw new AssertionError(e);
        }
    }

    public  ChunkHasher(SecretKey secretKey);

}