Closed SonaBIMDev closed 5 months ago
Yes I think you can. I used the example provided in the README and commented out the ExpiresAt, which still produces a XML string.
var passPhrase = "TestPassphrase";
var keyGenerator = Standard.Licensing.Security.Cryptography.KeyGenerator.Create();
var keyPair = keyGenerator.GenerateKeyPair();
var privateKey = keyPair.ToEncryptedPrivateKeyString(passPhrase);
var publicKey = keyPair.ToPublicKeyString();
var license = License.New()
.WithUniqueIdentifier(Guid.NewGuid())
.As(LicenseType.Trial)
//.ExpiresAt(DateTime.Now.AddDays(30))
.WithMaximumUtilization(5)
.WithProductFeatures(new Dictionary<string, string>
{
{"Sales Module", "yes"},
{"Purchase Module", "yes"},
{"Maximum Transactions", "10000"}
})
.LicensedTo("John Doe", "john.doe@example.com")
.CreateAndSignWithPrivateKey(privateKey, passPhrase);
Console.WriteLine(license.ToString());
Hi @AntiGuideAkquinet Wow! I didn't believe in it anymore! Thx for sharing!
Hi, is it possible to generate a Licence without an ExpiresAt condition? Thx