Table of Contents

Method ValidateFileChecksum

Namespace
LMKit.Model
Assembly
LM-Kit.NET.dll

ValidateFileChecksum()

Validates the integrity of the model file by comparing its SHA-256 checksum with the expected checksum.

public bool ValidateFileChecksum()

Returns

bool

Returns true if the checksum matches or no checksum is specified; otherwise, false.

Remarks

This method ensures that the file has not been tampered with or corrupted during download or transfer. It calculates the SHA-256 hash of the locally available file and compares it against the stored checksum value. If the stored checksum is not set or the file is not available locally, the method assumes the validation passes.