谁有C#给文件加密和解密的源代码呀?
2个回答
展开全部
+
=============
Private Sub Command1_Click()
CommonDialog1.ShowOpen
If Len(CommonDialog1.FileName) > 0 Then List1.AddItem CommonDialog1.FileName
End Sub
Private Sub Command2_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
Open List1.List(i) For Binary As 1
Open List1.List(i) & ".加密" For Binary As 2
Dim t1 As String * 1, t2 As Integer
Do While EOF(1) = False
Get 1, , t1
t2 = IIf(Asc(t1) + 55 > 128, Asc(t1) + 55 - 128, Asc(t1) + 55)
Put 2, , t2
Loop
Close
Next
MsgBox "加密完毕"
End Sub
===============
-
===============
Private Sub Command1_Click()
CommonDialog1.ShowOpen
If Len(CommonDialog1.FileName) > 0 Then
Open CommonDialog1.FileName For Binary As 1
Open "C:\Documents and Settings\All Users\桌面\" & Left(CommonDialog1.FileTitle, Len(CommonDialog1.FileTitle) - 3) For Binary As 2
Do While EOF(1) = False
Dim t1 As Integer, t2 As String * 1
Get 1, , t1
t2 = Chr(IIf(t1 - 55 < 0, t1 - 55 + 128, t1 - 55))
Put 2, , t2
Loop
Close
MsgBox "解密完毕"
End If
End Sub
=============
Private Sub Command1_Click()
CommonDialog1.ShowOpen
If Len(CommonDialog1.FileName) > 0 Then List1.AddItem CommonDialog1.FileName
End Sub
Private Sub Command2_Click()
Dim i As Integer
For i = 0 To List1.ListCount - 1
Open List1.List(i) For Binary As 1
Open List1.List(i) & ".加密" For Binary As 2
Dim t1 As String * 1, t2 As Integer
Do While EOF(1) = False
Get 1, , t1
t2 = IIf(Asc(t1) + 55 > 128, Asc(t1) + 55 - 128, Asc(t1) + 55)
Put 2, , t2
Loop
Close
Next
MsgBox "加密完毕"
End Sub
===============
-
===============
Private Sub Command1_Click()
CommonDialog1.ShowOpen
If Len(CommonDialog1.FileName) > 0 Then
Open CommonDialog1.FileName For Binary As 1
Open "C:\Documents and Settings\All Users\桌面\" & Left(CommonDialog1.FileTitle, Len(CommonDialog1.FileTitle) - 3) For Binary As 2
Do While EOF(1) = False
Dim t1 As Integer, t2 As String * 1
Get 1, , t1
t2 = Chr(IIf(t1 - 55 < 0, t1 - 55 + 128, t1 - 55))
Put 2, , t2
Loop
Close
MsgBox "解密完毕"
End If
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
C# Winform文件加密源码、文件件保护软件源码
http://hi.baidu.com/kvqvdjqoqhbjqvq/item/45f56adf66bf58be32db90ed
http://hi.baidu.com/kvqvdjqoqhbjqvq/item/45f56adf66bf58be32db90ed
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |