// 2. Helper functions -------------------------------------------------------- private string SanitizeKey(string input)
// Typically: key = <payload>.<signature> // Decrypt payload (AES‑GCM) using a per‑install random key that is wrapped // with the public key. Return a typed object. finecam registration code
// d) Decode license payload (might be base64+AES) LicensePayload payload = DecodeLicense(cleaned); if (payload == null) return RegistrationResult.CorruptPayload; finecam registration code
// 1. Public API -------------------------------------------------------------- public RegistrationResult Register(string userInput) finecam registration code
// f) Persist securely SaveLicenseSecurely(payload);
// c) Cryptographic verification if (!VerifySignature(cleaned)) return RegistrationResult.InvalidSignature;