class SystemService {

    public AnchorFile getAnchorFileFromBytes(byte[] anchorBytes, boolean shouldVerifyAnchorInstance)
            throws InvalidAnchorInstanceException, MalformedAnchorException {
        ConfigurationAnchorV2 anchor = createAnchorFromBytes(anchorBytes);
        if (shouldVerifyAnchorInstance) {
            verifyAnchorInstance(anchor);
        }
        AnchorFile anchorFile = new AnchorFile(calculateAnchorHexHash(anchorBytes));
        anchorFile.setCreatedAt(FormatUtils.fromDateToOffsetDateTime(anchor.getGeneratedAt()));
        return anchorFile;
    }

    @Autowired public  SystemService(GlobalConfService globalConfService, ServerConfService serverConfService,
            AnchorRepository anchorRepository, ConfigurationVerifier configurationVerifier,
            CurrentSecurityServerId currentSecurityServerId,
            AuditDataHelper auditDataHelper);

}