当前位置:编程学习 > Delphi >>

这款"文件夹加密程序"的一些疑问,编程高手来看看哦,

程序截图:,下载地址: http://www.duote.com/soft/1490.html

 

大家去用一下,看看怎么对文件夹进行加密的,

我估计是修改注册表,实现的,

-

我的问题是,请大家用delphi做出一个类型这样的程序,实现主要的加密/解密功能即可,其他的可以忽略,谢谢喽!

追问:

这个是加密字符串的几个函数

我要的是加密文件夹的哦,这个不能用来加密文件夹

答案:

哎,没有合适的答案,哦,

我看到有一些不错的加密程序,百度找把

唉~~爱莫能助咯!兄台
public   sub   main()  
dim   key   as   string  
for   i   =   1   to   16  
        randomize  
        key   =   key   &   chr(rnd   *   255)  
next   i  
msgbox   rc4(rc4( "welcome   to   plindge   studio! ",   key),   key)  
end   sub  
public   function   rc4(inp   as   string,   key   as   string)   as   string  
dim   s(0   to   255)   as   byte,   k(0   to   255)   as   byte,   i   as   long  
dim   j   as   long,   temp   as   byte,   y   as   byte,   t   as   long,   x   as   long  
dim   outp   as   string  

for   i   =   0   to   255  
        s(i)   =   i  
next  

j   =   1  
for   i   =   0   to   255  
        if   j   >   len(key)   then   j   =   1  
        k(i)   =   asc(mid(key,   j,   1))  
        j   =   j   +   1  
next   i  

j   =   0  
for   i   =   0   to   255  
        j   =   (j   +   s(i)   +   k(i))   mod   256  
        temp   =   s(i)  
        s(i)   =   s(j)  
        s(j)   =   temp  
next   i  

i   =   0  
j   =   0  
for   x   =   1   to   len(inp)  
        i   =   (i   +   1)   mod   256  
        j   =   (j   +   s(i))   mod   256  
        temp   =   s(i)  
        s(i)   =   s(j)  
        s(j)   =   temp  
        t   =   (s(i)   +   (s(j)   mod   256))   mod   256  
        y   =   s(t)  
         
        outp   =   outp   &   chr(asc(mid(inp,   x,   1))   xor   y)  
next  
rc4   =   outp  
end   function  


一个简单实用的   vb   加密/解密算法    

Function   UserCode(password   As   String)   As   String
'用户口令加密
        Dim   il_bit,   il_x,   il_y,   il_z,   il_len,   i   As   Long
        Dim   is_out   As   String
        il_len   =   Len(password)
        il_x   =   0
        il_y   =   0
        is_out   =   " "
        For   i   =   1   To   il_len
                il_bit   =   AscW(Mid(password,   i,   1))         'W系列支持unicode
               
                il_y   =   (il_bit   *   13   Mod   256)   +   il_x
                is_out   =   is_out   &   ChrW(Fix(il_y))     '取整   int和fix区别:   fix修正负数
                il_x   =   il_bit   *   13   /   256
        Next
        is_out   =   is_out   &   ChrW(Fix(il_x))
       
        password   =   is_out
        il_len   =   Len(password)
        il_x   =   0
        il_y   =   0
        is_out   =   " "
        For   i   =   1   To   il_len
                il_bit   =   AscW(Mid(password,   i,   1))
                '取前4位值
                il_y   =   il_bit   /   16   +   64
                is_out   =   is_out   &   ChrW(Fix(il_y))
                '取后4位值
                il_y   =   (il_bit   Mod   16)   +   64
                is_out   =   is_out   &   ChrW(Fix(il_y))
        Next
        UserCode   =   is_out
End   Function
Function   UserDeCode(password   As   String)   As   String
'口令解密
        Dim   is_out   As   String
        Dim   il_x,   il_y,   il_len,   i,   il_bit   As   Long

        il_len   =   Len(password)
        il_x   =   0
        il_y   =   0
        is_out   =   " "
        For   i   =   1   To   il_len   Step   2
                il_bit   =   AscW(Mid(password,   i,   1))
                '取前4位值
                il_y   =   (il_bit   -   64)   *   16
                '取后4位值
                'dd   =   AscW(Mid(password,   i   +   1,   1))   -   64
                il_y   =   il_y   +   AscW(Mid(password,   i   +   1,   1))   -   64
                is_out   =   is_out   &   ChrW(il_y)
        Next

        il_x   =   0
        il_y   =   0
        password   =   is_out
        is_out   =   " "

        il_len   =   Len(password)
        il_x   =   AscW(Mid(password,   il_len,   1))      

        For   i   =   (il_len   -

上一个:电脑问题解答
下一个:学习系统底层操作需要哪些知识?

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,