Foxtable(狐表)用户栏目专家坐堂 → [求助]搜了下论坛,有人研究过AES加密,能把dll发来借用下么?


  共有2625人关注过本帖树形打印复制链接

主题:[求助]搜了下论坛,有人研究过AES加密,能把dll发来借用下么?

帅哥哟,离线,有人找我吗?
浙江仔
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1326 积分:9603 威望:0 精华:1 注册:2010/7/21 14:20:00
[求助]搜了下论坛,有人研究过AES加密,能把dll发来借用下么?  发帖心情 Post By:2018/12/7 15:47:00 [显示全部帖子]

如题,想用aes加密,找dll

 回到顶部
帅哥哟,离线,有人找我吗?
浙江仔
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1326 积分:9603 威望:0 精华:1 注册:2010/7/21 14:20:00
  发帖心情 Post By:2018/12/7 19:27:00 [显示全部帖子]

成了,不过和别人java系统生成的密码对不上图片点击可在新窗口打开查看


Public Function Encrypt(ByVal encryptStr As String, ByVal key As String) As String
Dim keyArray As Byte() = UTF8Encoding.UTF8.GetBytes(key)
Dim toEncryptArray As Byte() = UTF8Encoding.UTF8.GetBytes(encryptStr)
Dim rDel As System.Security.Cryptography.RijndaelManaged = New System.Security.Cryptography.RijndaelManaged()
rDel.Key = keyArray
rDel.Mode = System.Security.Cryptography.CipherMode.ECB
rDel.Padding = System.Security.Cryptography.PaddingMode.PKCS7
Dim cTransform As System.Security.Cryptography.ICryptoTransform = rDel.CreateEncryptor()
Dim resultArray As Byte() = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length)
Return Convert.ToBase64String(resultArray, 0, resultArray.Length)
End Function


Public Function Decrypt(ByVal decryptStr As String, ByVal key As String) As String
Dim keyArray As Byte() = UTF8Encoding.UTF8.GetBytes(key)
Dim toEncryptArray As Byte() = Convert.FromBase64String(decryptStr)
Dim rDel As System.Security.Cryptography.RijndaelManaged = New System.Security.Cryptography.RijndaelManaged()
rDel.Key = keyArray
rDel.Mode = System.Security.Cryptography.CipherMode.ECB
rDel.Padding = System.Security.Cryptography.PaddingMode.PKCS7
Dim cTransform As System.Security.Cryptography.ICryptoTransform = rDel.CreateDecryptor()
Dim resultArray As Byte() = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length)
Return UTF8Encoding.UTF8.GetString(resultArray)
End Function




 回到顶部
帅哥哟,离线,有人找我吗?
浙江仔
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1326 积分:9603 威望:0 精华:1 注册:2010/7/21 14:20:00
  发帖心情 Post By:2018/12/8 8:52:00 [显示全部帖子]

字符串:peng,8064090
key:46EBA22EF5204DD5B110A1F730513965
密码:P3XNKG86T9HySfac2YCCyQ==
java密码:ulAxHbefYOuLaM4RlBZBXw==

 回到顶部