2

我正在编写一个 VB.Net 应用程序,它读取和解密来自 JSON Web 服务的响应。我有秘密密码,我可以使用在线解密工具等毫无问题地解密加密的字符串。但是,我还没有弄清楚如何在 VB.Net 中编写代码。

下面是从 JSON Web 服务返回的加密字符串示例:

CMc5uJdkccbwzT2EgWri+VFrgDGeAqWPx4W/+xgCLl9hiUzrQuTf/hNo9AP3aWmT+vQcH0yQxq6eRA9PafD+XCD3bYhiNjlSgjSefN3gkWinuj2d7sGFhVyjk75b+vM/RLUd9QgxjM4NgEgBHbXJjS3LEavblRXmXvtAvvx8ON+TE4I/8TpxoUsqKGahIBPWuXxRGlRHQmIqg1KOT61qVH9Vj/6A9yGFWH8m+IQKFHA+ZZ6dmkfnkd2vvq6eLPus/zs2l6uP2dnwupkdeB5XbEibRqK7KVJF9Bj+S6RFyqE4VfCD0ouMjQjLU7zcYvNGogUUwqrsecQ7aybJcptSMl572M4wCrEJ5zFveZHIfk7nocEXDxrmre5pw7X95Gj/d2Tpy0Gfe927/JT+fCv7YIitZXFyjLckCv4QtAMFxeZaA2YPNOBWKLoRlZfCczKuPT1IGj4FONVwdYWrb0nijRvvXBQCwfegXBgI7h3CU4Z+mSbChYQrNcHgZim0E608IVkeO3xyQyAj4KtnVXMU2fljP+2FxR8swsEUdhT/9fD6NFMrNA6y78InnLBokK4Sp/wnok55SqlPDeJcWeaXsK+4ih2ZvxwdoRSLo5vR9Me90Wlh7MUhZAs0LB+hBs+lVWwJfKbQgXRRIvZIIBiBHGQyQDSrfSMmXep9RnCdF5o+J/aXIEiL0SMGymvL2wyW6l9hBRw9ffRB6wLROfYUgUNUTZNJIoVX5NXzRizB6U62+vOajMYWwAJ0tVvvmAtqJ9hL3QGHYvL1jRl9t+xyksKaEoTMNXWSh3M+/2CIRxU8rZt4YrM1droN1xvan9x/f/KRJFn90dcYc1FGrhzaV4R1QoybJb4SaCn44GK+imfyQQbm92oqQVrLEtbUQrcX34kUgXZKMIXbCF7pcxwA9t44jL1vGxPzzhag0D2OIOL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IzYJGNwTCZqAT2aytAv2rPH6P/anGlsZgxtvf8uapc3sn2CyoXxmDF4D7DAtdL/MA==

钥匙:

d40da16b8bc6b5e33ef3ae5f704edb2b

我知道这是 Rinjdael-128 加密,并且字符串需要进行 Base64 解码。我似乎无法弄清楚在 VB.Net 中执行此操作的代码。我已经在网上尝试了一些喜欢的例子,但我所做的一切都没有得到预期的结果。预期的 JSON 应该是 JSON 格式的字符串。

这是我最近一次失败的尝试:

Dim rmt As RijndaelManaged = New RijndaelManaged()

   Using rmt
       rmt.KeySize = 128
       rmt.Mode = CipherMode.CBC
       rmt.Padding = PaddingMode.ISO10126

       Dim ciphertext() As Byte = Convert.FromBase64String(json)

       Dim plaintext() As Byte = rmt.CreateDecryptor(Convert.FromBase64String(key), System.Text.Encoding.ASCII.GetBytes(InitialVector)).TransformFinalBlock(ciphertext, 0, ciphertext.Length)

       Dim decryptedtext As String = System.Text.Encoding.UTF8.GetString(plaintext)
                        Console.WriteLine(decryptedtext)
   End Using

我将非常感谢任何人可以提供的任何见解或帮助。

谢谢

4

2 回答 2

0

答案是,在大多数情况下,与其说是在(字符)编码中的加密,不如说是在知道如何应用 IV 和填充。如果您更正密钥、IV 的编码并使用正确的填充,则消息应该解密。

这个答案或多或少总结了设法检索纯文本的评论中的建议;最重要的是,密钥是十六进制而不是 base64。

于 2012-05-31T00:12:19.183 回答
0

我很久以前构建了这个dll。它适用于 Rijndael 解密。我希望这可以解决您的问题:

Imports Microsoft.VisualBasic
Imports System.Security.Cryptography
Imports System.IO
Imports System.Text
Imports Microsoft.Win32

Public Class GateKeeper


    Public Function Decipher(ByVal vstrStringToBeDecrypted As String, ByVal vstrDecryptionKey As String) As String

        Dim bytDataToBeDecrypted() As Byte
        Dim bytTemp() As Byte
        Dim bytIV() As Byte = {121, 241, 10, 1, 132, 74, 11, 39, 255, 91, 45, 78, 14, 211, 22, 62}
        Dim objRijndaelManaged As New RijndaelManaged
        Dim objMemoryStream As MemoryStream
        Dim objCryptoStream As CryptoStream
        Dim bytDecryptionKey() As Byte

        Dim intLength As Integer
        Dim intRemaining As Integer
        Dim intCtr As Integer
        Dim strReturnString As String = String.Empty
        Dim achrCharacterArray() As Char
        Dim intIndex As Integer
        Dim StripNullCharactersFunc As New StringHandler

        bytDataToBeDecrypted = Convert.FromBase64String(vstrStringToBeDecrypted)

        intLength = Len(vstrDecryptionKey)


        If intLength >= 32 Then
            vstrDecryptionKey = Strings.Left(vstrDecryptionKey, 32)
        Else
            intLength = Len(vstrDecryptionKey)
            intRemaining = 32 - intLength
            vstrDecryptionKey = vstrDecryptionKey & Strings.StrDup(intRemaining, "X")
        End If

        bytDecryptionKey = Encoding.ASCII.GetBytes(vstrDecryptionKey.ToCharArray)

        ReDim bytTemp(bytDataToBeDecrypted.Length)

        objMemoryStream = New MemoryStream(bytDataToBeDecrypted)

        Try

            objCryptoStream = New CryptoStream(objMemoryStream, _
               objRijndaelManaged.CreateDecryptor(bytDecryptionKey, bytIV), _
               CryptoStreamMode.Read)

            objCryptoStream.Read(bytTemp, 0, bytTemp.Length)

            objCryptoStream.FlushFinalBlock()
            objMemoryStream.Close()
            objCryptoStream.Close()

        Catch

        End Try

        Return StripNullCharactersFunc.StripNullCharacters(Encoding.ASCII.GetString(bytTemp))

    End Function

End Class



Imports Microsoft.VisualBasic
Imports System.Text.RegularExpressions

Public Class StringHandler

    'lets get rid oof spaces
    Public Function StripNullCharacters(ByVal vstrStringWithNulls As String) As String
        'This function removes spaces from strings

        Dim intPosition As Integer
        Dim strStringWithOutNulls As String

        intPosition = 1
        strStringWithOutNulls = vstrStringWithNulls

        Do While intPosition > 0
            intPosition = InStr(intPosition, vstrStringWithNulls, vbNullChar)

            If intPosition > 0 Then
                strStringWithOutNulls = Left$(strStringWithOutNulls, intPosition - 1) & _
                                  Right$(strStringWithOutNulls, Len(strStringWithOutNulls) - intPosition)
            End If

            If intPosition > strStringWithOutNulls.Length Then
                Exit Do
            End If
        Loop

        Return strStringWithOutNulls

    End Function

End Class
于 2012-05-31T02:05:33.303 回答