public static void ReadActivationCode(StringBuilder code, short prodId) { // if (RegUtil.LicenseProperties == null || RegUtil.LicenseProperties.UserInfo == null) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { UnManagedNCLicense.ReadActivationCode(code, prodId); } else { RegUtil.LoadRegistry(); NCCryptoCode.Decode(RegUtil.LicenseProperties.UserInfo.AuthCode, code); } }
public static void ReadInstallCode(StringBuilder s, short productId) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { UnManagedNCLicense.ReadInstallCode(s, productId); } else { if (!string.IsNullOrEmpty(_installCode)) { s.Append(_installCode); return; } RegUtil.LoadRegistry(); var installCode = RegUtil.GetInstallCode(); NCCryptoCode.Decode(installCode, s); _installCode = s.ToString(); } }