try {
MessageDigest digest = MessageDigest.getInstance(DIGEST_ALG);
byte[] sha = digest.digest(keyBytes);
keyBytesSha = Base64.encodeBytes(sha);
} catch(NoSuchAlgorithmException e) {
throw new JpaStoreException("Failed to create SHA hash of metadata key", e);
}
return keyBytesSha;
}