class Crypto {

    public static byte [] sha256(byte [] data) throws CryptoException {
        MessageDigest sha256;
        try {
            sha256 = MessageDigest.getInstance("SHA-256");
            ///CLOVER:OFF
        } catch (NoSuchAlgorithmException e) {
            LOG.error("sha256: Caught NoSuchAlgorithmException, check to make sure the algorithm is supported by the provider.");
            throw new CryptoException(e);
        }
        ///CLOVER:ON
        return sha256.digest(data);
    }

}