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;

MachineIDPart := Parts[0]; HashPart := Parts[High(Parts)]; file activation delphi 2016

On activation, your server returns this encoded string as a .key or .lic file. When your application starts, locate the activation file and validate it. var Lines: TStringList