Ellipter UI

This page contains some examples in C# on using Ellipter, and although we think they are simple enought to be understood we highly recommend to read our FAQ before diving into them.
The DLL name is SeriousBit.Ellipter.dll, and usually it is located in C:\Program Files\SeriousBit Ellipter\bin
The using reference for SeriousBit Ellipter is
using SeriousBit.Ellipter;
A private/public keys pair is the central concept in Ellipter, the private key is used to create serials while the public one verifies them (the serials).
You shoould never put your private keys in end-user products' code and never share it with third parties (even with us).
All private and public keys should be created with Elliper, or your code won't work:
//get a trial developer key from http://ellipter.com/trial string developerName = "SeriousBit"; string developerKey = "1UASDASD595FLEA11QQ1TJFT2AJEZBGRWUQXTAFQ22JEBA"; SerialsManager manager = new SerialsManager(developerName, developerKey); //create keys pair manager.CreatePrivatePublicKeys(); string publicKey = manager.PublicKey; string privateKey = manager.PrivateKey; Console.WriteLine("Public key: {0}\r\nPrivate key: {1}", publicKey, privateKey);
To create a serial Ellipter needs only the private key to be provided:
SerialsManager manager = new SerialsManager(); //set the private key manager.PrivateKey = "3UFTLG36ENNWR9GVC4QGMTA"; //a private key can be created here //create a serial with a random ID string serial = manager.CreateSerial(); Console.WriteLine("Serial: {0}", serial);
To validate a serial Ellipter needs only the public key:
SerialsManager manager = new SerialsManager(developerName, developerKey); //set the public key, you can create a public key here manager.PublicKey = "WQZZUY4ESSXDRC6PD5N2AMFKDRV2X6QLUVNGAWNB5Y84NSQ"; string serial = "7CCRB4-VKBY6G-3FV7FD-8F4JA1-1QQ"; //validate serial bool isSerialValid = manager.IsValid(serial); if(isSerialValid) Console.WriteLine("Serial is valid"); else Console.WriteLine("Serial is not valid");
SerialsManager manager = new SerialsManager(developerName, developerKey); //set public key manager.PublicKey = "WT9CW5DMFW4PZC3CJVW7BKBGAVDTR86AFSD2UFWGLDU57JZ"; string serial = "QUTHME-UKCNBX-U4J49C-YTSRUV-12Q1AS-Z"; //validate serial if(manager.IsValid(serial)) { //get serial ID int id = manager.GetID(serial); //get serial info string info = manager.GetInfo(serial); Console.WriteLine("Serial ID: {0}\r\nSerial info: {1}", id, info); } else { Console.WriteLine("Serial is not valid"); }