如何在c#.net中制作一年的许可证文件? [英] How to make licence file for one year in c# .net?

查看:162
本文介绍了如何在c#.net中制作一年的许可证文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



如何在c#.net中制作一年的许可证文件?



请帮帮我。



先谢谢。



Ankit Agarwal

软件工程师

Hello,

How to make licence file for one year in c# .net?

Please help me.

Thanks in Advance.

Ankit Agarwal
Software Engineer

推荐答案

看到这个.. :)



.Net应用程序的软件拷贝保护 - 教程 [ ^ ]
see this.. :)

Software Copy Protection for .Net Applications - a Tutorial[^]


最简单的方式;

1)找到自己的16长度密码字符串,在你的应用程序中硬编码。 />


2)使用.net的Rjndael创建你的加密解密函数。



3)创建一个文件任何扩展和写入到期日期字符串(首先用你的密码加密)到它。



4)程序加载这个文件,如果解密成功,它会创建一个副本appdata文件夹下的文件。



5)每次应用程序启动时,首先检查此文件是否存在;如果存在解密它,转换为datetime并与datetime.now比较,如果过期的许可证超过其他显示完整版本。

并且不要忘记obfustucate你的程序集。



注意:

请记住,此许可证文件不是特定于机器的,适用于所有人。如果要创建特定于计算机的许可文件,则需要使用指纹为每台计算机创建唯一的许可文件。
Easiest way;
1) Find yourself 16 length password string which is hardcoded in ur app.

2) Use Rjndael of .net to create ur encrypt decrypt functions.

3) Create a file with any extension and write expiration date string(which is encrypted first with ur password) into it.

4) Program loads this file, if decryption succeeds it creates a copy of file under appdata folder.

5) Each time app starts, first check if this file exists; if exists decrypt it, convert to datetime and compare with datetime.now, if expired license over else show full version.
And don't forget to obfustucate your assembly.

Notes:
And keep in mind, this license file is not machine specific and works for all. if you want to create license file specific to machine, you need to create unique license files per machine with using fingerprint of it.


这篇关于如何在c#.net中制作一年的许可证文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆