用注册表对delphi程序加密
本加密方法分三部分: 2. 若初次使用,则设新密码;若是已经设置密码,则进行验证。 3. 一个密码变换小程序(比原来的复杂得多)。当然,如果需要修改密码的功能,只要将设置密码部分改动一下即可。 一、程序启动时,通过搜索注册表,判断是否已有密码,来确定窗口的显示内容。不过事先应有以下的声明然后才能使用: 在user中加入TRegistry,在var声明中加入以下几个窗体变量:
二、按钮的响应代码:包括新设密码和验证密码。
三、密码变换程序:注意要预先定义。 这个变换小程序在笔者看来还不算很复杂,只进行了两次变换,不过,想要破译也是得费点劲。读者还可以采用其他的数学函数进行更为复杂的变换。
|
- 上一篇:自制替换指定串函数
- 下一篇:排序Select中Option项的一个示例