matchChecksum

matchChecksum(): Boolean;

The matchChecksum method of the JadeBytes class calculates the MD5 checksum for the current binary contents of a singleFile instance and returns true if it matches the stored checksum.

This method always returns true for shared file instances.

The following example shows the use of the matchChecksum method.

vars
    bytes : MyJadeBytes;
begin
    beginTransaction;
    create bytes persistent;
    bytes.singleFile := true;
    bytes.appendData("This is content".Binary);
    write bytes.matchChecksum();   // Writes "false"
    bytes.updateChecksum();
    write bytes.matchChecksum()    // Writes "true";
epilog
    abortTransaction;
end;