我在VB6中使用了ChilkatCrypt2加密。现在在.NET中,我想使用System.Security.Cryptography。
我使用:
Public Function Encripta(pTexto As String, pChave As String, pModo As Byte) As String
Dim vMD5 As New ChilkatCrypt2
vMD5.UnlockComponent "..................."
vMD5.Charset = "utf-8"
vMD5.KeyLength = 128
vMD5.CryptAlgorithm = "rijndael"
vMD5.SecretKey = vMD5.GenerateSecretKey(pChave)
vMD5.EncodingMode = "hex"
If pModo = 1 Then
Encripta = vMD5.EncryptStringENC(pTexto)
Else
Encripta = vMD5.DecryptStringENC(pTexto)
End If
Set vMD5 = Nothing
End Function有没有人可以帮我用.NET (VB或C#)重写,这样现有的加密值就可以正确解密了。我无法计算出参数的等价性。
发布于 2013-05-29 21:06:38
就像jac说的。
注意:.NET组件可以做到这一点。
https://stackoverflow.com/questions/16776775
复制相似问题