導航:首頁 > 文檔加密 > 文字加密器解密

文字加密器解密

發布時間:2024-06-29 19:36:05

『壹』 文件加密器的密碼忘記了,怎麼解密啊

壓縮文件為例,解決方法:

1、首先下一款文件密碼破解工具,解壓並雙擊運行其中的「RARPasswordUnlocker.exe」程序,即可啟動WINRAR壓縮文件密碼破解程序。

『貳』 運用VB對文字進行加密解密

'這是我從網上找到的一段加密解密的代碼,很不錯,應該符合要求。
'文本框的multiline屬性是用來設置是否可以接受多行文本,只能在窗體上手工設置。
'文本框的scrollbars屬性是用來設置是否有垂直和水平滾動條的,也只能在窗體上手工設置。
'keyAscii不清楚是作什麼用的。
'兩個StrConv函數用的太好了,我沒想到能處理的這么簡單。

Option Explicit
Dim key() As Byte

Sub initkey() '這里為密匙,建議定義的復雜些,我這里僅僅是個示例
ReDim key(9)
key(0) = 12
key(1) = 43
key(2) = 53
key(3) = 67
key(4) = 78
key(5) = 82
key(6) = 91
key(7) = 245
key(8) = 218
key(9) = 190
End Sub

Function Pass_Encode(ByVal s As String) As String '加密
On Error GoTo myerr
initkey
Dim buff() As Byte
buff = StrConv(s, vbFromUnicode)
Dim i As Long, j As Long
Dim k As Long
k = UBound(key) + 1
For i = 0 To UBound(buff)
j = i Mod k
buff(i) = buff(i) Xor key(j)
Next
Dim mstr As String
mstr = ""
Dim outstr As String
Dim temps As String
For i = 0 To UBound(buff)
k = buff(i) \ Len(mstr)
j = buff(i) Mod Len(mstr)
temps = Mid(mstr, j + 1, 1) + Mid(mstr, k + 1, 1)
outstr = outstr + temps
Next
Pass_Encode = outstr
Exit Function
myerr:
Pass_Encode = ""
End Function

Function Pass_Decode(ByVal s As String) As String '解密
On Error GoTo myerr
initkey
Dim i As Long, j As Long
Dim k As Long, n As Long
Dim mstr As String
mstr = ""
Dim outstr As String
Dim temps As String
If Len(s) Mod 2 = 1 Then
Pass_Decode = ""
Exit Function
End If
Dim t1 As String
Dim t2 As String
Dim buff() As Byte
Dim m As Long
m = 0
For i = 1 To Len(s) Step 2
t1 = Mid(s, i, 1)
t2 = Mid(s, i + 1, 1)
j = InStr(1, mstr, t1)
k = InStr(1, mstr, t2)
n = j - 1 + (k - 1) * Len(mstr)
ReDim Preserve buff(m)
buff(m) = n
m = m + 1
Next
k = UBound(key) + 1
For i = 0 To UBound(buff)
j = i Mod k
buff(i) = buff(i) Xor key(j)
Next
Pass_Decode = StrConv(buff, vbUnicode)
Exit Function
myerr:
Pass_Decode = ""
End Function

Private Sub Command1_Click()
Text2.Text = Pass_Encode(Text1.Text)
Text3.Text = Pass_Decode(Text2.Text)
End Sub

閱讀全文

與文字加密器解密相關的資料

熱點內容
大型解壓器怎麼做 瀏覽:171
如何保存網頁成PDF 瀏覽:486
linux怎麼編譯內核 瀏覽:430
solidworks入門pdf 瀏覽:819
中國工商銀行app如何看支行 瀏覽:433
wps弄照片到文件夾 瀏覽:463
大眾如何在線編程 瀏覽:787
ipad如何關閉app中的app 瀏覽:442
大腦認知pdf 瀏覽:441
程序員大方 瀏覽:794
怎樣加密微信聊天記錄簡單點 瀏覽:387
python數據類型狀態判斷 瀏覽:47
java文件打開對話框 瀏覽:824
pdf怎麼打勾 瀏覽:21
java資料庫insert 瀏覽:668
金山雲新用戶伺服器 瀏覽:719
量品量體師app下載後如何注冊 瀏覽:911
江湖app房主怎麼坐莊 瀏覽:910
eclipseandroid智能提示 瀏覽:475
android圖書管理源碼 瀏覽:108