chilkatdotnet4.dll crypt2.decryptbytes method return 0 bytes in vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sreeramrengaraj
    New Member
    • May 2013
    • 1

    #1

    chilkatdotnet4.dll crypt2.decryptbytes method return 0 bytes in vb.net

    Hi We have been using ChilkatDotNet.d ll Version 8.2.0 with .Net Framework. We use Chilkat.MIME and Chilkat.Crypt2 classes. The Framework version of ChilKatDotNet.d ll is working But the ChilkatDotNet4. DLL is not working with Similar functional.

    The Old Working Code:

    Code:
    Dim _tempMime As String = Incoming Data 
    _Body = New Chilkat.Mime 
    Dim _EncodedContent As Byte() = System.Text.Encoding.GetEncoding(1252).GetBytes(_tempMime)_Body.LoadMimeBinary(_EncodedContent) 
    Dim _crypt As New Chilkat.Crypt2 _crypt.CryptAlgorithm = "PKI" 
    _RawContent = _crypt.DecryptBytes(_Body.GetBodyBinary())
    New and not working code:
    Code:
    Dim _tempMime As String = Incoming Data 
    _Body = New Chilkat.Mime 
    Dim _EncodedContent As Byte() = System.Text.Encoding.GetEncoding(1252).GetBytes(_tempMime)_Body.LoadMimeBytes(_EncodedContent) 
    Dim _crypt As New Chilkat.Crypt2 _crypt.CryptAlgorithm = "PKI" 
    _RawContent = _crypt.DecryptBytes(_Body.GetBodyBinary())
    Only Change is that LoadMimeBinary is not available ChilkatDotNEt4. dll so using LoadMimeBytes.
    here LoadMimeBinary( ChilkatDotNet.d ll ) and LoadMimeBytes(C hilkatDotNet4.d ll) methods returns same value of bytes.

    With this _crypt.DecryptB ytes returns 0 Bytes.
    chilkat log file shows message as
    "Found matching certificate.
    Found matching certificate, but no private key is available."

    Thanks Advance. .
    Last edited by Rabbit; May 16 '13, 05:57 PM. Reason: Please use code tags when posting code.
Working...