Discussion on key technologies used to create firmware under. net I: Licensing

Source: Internet
Author: User
Tags asymmetric encryption
There are three key points for creating a firmware:

    • How to protect objects (Program), Check the license when creating the object ).
    • Encrypt/decrypt user information and registration information.
    • Program disturbing (obfuscate) or Program Encryption, anti-cracking.

. NET provides basic support for the first two, which is very convenient. Check the license first. The license can be in the form of a general registration code, a registration code for the authentication user name, and a registration code for the authentication user machine. When a user pays for the ware program, the owner of the ware program will send a registration code to the user. (Share-it provides the online registration code generation function. The registration code is automatically generated immediately upon receipt of the money ).

When running the program, ware checks and verifies whether the user has a valid registration code to determine whether the user can execute the program.

. Net programs are object-oriented, so. NET provides an interface for license detection in the object creation mechanism. The development of the ware program can add its own registration code for verification.Algorithm.

The. NET licensing article describes how to detect a license:

[Licenseproviderattribute ( Typeof ( Licfilelicenseprovider )]
Public Class Licensedclass: idisposable
{
Private License license = Null ;
Public Licensedclass ()
{
License = licensemanager. Validate ( Typeof (Licensedclass ), This );
Console. writeline ( "Hello from the licensed class ." );
}
Public Void Dispose ()
{
If (License! = Null )
{
License. Dispose ();
License = Null ;
}
}
}

With such a structure, program development can hand over the detection license to. net, and concentrate on designing how to verify the registration code. Put the aboveLicfilelicenseproviderChange to your own m licenseprovider. For example, to read the Registry without reading the file, see: codeguru: licensed applications using the. NET Framework. Some of my articles are added to Favorites (RSS format ).

Whether it is getting a registration code from a file or from the registry, it contains information about whether the user can run the program, and it must be determined only by the owner of the ware program. Therefore, this information must be encrypted.

. NET provides an asymmetric encryption tool that can be used to process registration codes. Next articleArticle.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.