File Activation Delphi 2016 !!top!! ✪
// Rebuild the original data without the hash SetLength(Parts, Length(Parts) - 1); CalculatedHash := THashSHA2.GetHashString(string.Join('|', Parts), SHA256);
MachineIDPart := Parts[0]; HashPart := Parts[High(Parts)]; file activation delphi 2016
function ValidateActivationFile(const FileName: string): Boolean; var Lines: TStringList; Decoded, MachineIDPart, HashPart, CalculatedHash: string; Parts: TArray<string>; begin Result := False; if not FileExists(FileName) then Exit; Lines := TStringList.Create; try Lines.LoadFromFile(FileName); if Lines.Count = 0 then Exit; Decoded := TNetEncoding.Base64.Decode(Lines[0]); Parts := Decoded.Split(['|']); if Length(Parts) < 3 then Exit; // Rebuild the original data without the hash
Result := True; finally Lines.Free; end; end; In your project source (or main form’s OnCreate ): Length(Parts) - 1)