By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,619 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

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

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

The Old Working Code:

Expand|Select|Wrap|Line Numbers
  1. Dim _tempMime As String = Incoming Data 
  2. _Body = New Chilkat.Mime 
  3. Dim _EncodedContent As Byte() = System.Text.Encoding.GetEncoding(1252).GetBytes(_tempMime)_Body.LoadMimeBinary(_EncodedContent) 
  4. Dim _crypt As New Chilkat.Crypt2 _crypt.CryptAlgorithm = "PKI" 
  5. _RawContent = _crypt.DecryptBytes(_Body.GetBodyBinary())
New and not working code:
Expand|Select|Wrap|Line Numbers
  1. Dim _tempMime As String = Incoming Data 
  2. _Body = New Chilkat.Mime 
  3. Dim _EncodedContent As Byte() = System.Text.Encoding.GetEncoding(1252).GetBytes(_tempMime)_Body.LoadMimeBytes(_EncodedContent) 
  4. Dim _crypt As New Chilkat.Crypt2 _crypt.CryptAlgorithm = "PKI" 
  5. _RawContent = _crypt.DecryptBytes(_Body.GetBodyBinary())
Only Change is that LoadMimeBinary is not available ChilkatDotNEt4.dll so using LoadMimeBytes.
here LoadMimeBinary(ChilkatDotNet.dll ) and LoadMimeBytes(ChilkatDotNet4.dll) methods returns same value of bytes.

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

Thanks Advance. .
May 16 '13 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.