Home /Examples/lib/examples/crypto/BASIC-integrity-workflow.sleela

BASIC-integrity-workflow.sleela

lib/examples/crypto/BASIC-integrity-workflow.sleela · 15 line(s) · sleela

#sleela 1.7
// BASIC: the trusted-verifier workflow, stated as steps.
// This does NOT implement cryptography. SLeeLa's real integrity checks are done
// by the repository's verified SHA-256 tool against security/sha256-manifest.json;
// this example only teaches the order of operations.
class BasicIntegrityWorkflow {
    void main() {
        print("1. choose the exact file and the trusted manifest");
        print("2. compute the file digest with the approved verifier");
        print("3. compare the digest against the manifest entry");
        print("4. stop (fail closed) when the comparison does not match");
        print("5. record the verification result");
    }
}