login about faq

Hi when i run the following code i don't get an error but i don't get an output either?

private void TwoFish_Encrypt()
        Chilkat.Crypt2 crypt = new Chilkat.Crypt2();
        crypt.CryptAlgorithm = "twofish";
        crypt.CipherMode = "ecb";
        crypt.KeyLength = 256;
        crypt.PaddingScheme = 0;
        crypt.EncodingMode = "base64";
        var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(Genkey.Text);
        string keybase64 = System.Convert.ToBase64String(plainTextBytes);
        crypt.SetEncodedKey(keybase64, "base64");
        string encStr = crypt.EncryptStringENC(Input.Text);
        DecryptText.Text = encStr;

asked Jun 21 '15 at 08:25

Yusuf20x's gravatar image


Chilkat doesn't raise exceptions, so it's important to check the LastErrorText property after a method call fails. Can you post the contents of the LastErrorText property after calling SetEncodedKey and again after calling EncryptStringEnc (please put the results in <pre></pre> tags.


answered Jun 21 '15 at 14:00

jpbro's gravatar image

jpbro ♦

Yeah that's my point nothing gets displayed in the Error list after the method gets called! I get no feed back from it i have tried different versions of ChilkatDotNet45.dll and change the CPU architecture each time to match? absolutely nothing happens its so odd.

(Jun 21 '15 at 17:38) Yusuf20x

What's the error list, the contents of the LastErrorText property? If so, are the contents really completely blank?

(Jun 21 '15 at 22:09) jpbro ♦

yes its completely blank i am amusing your are referring to the error list that show when the application is run and is normally situated at the bottom center right of the screen?

(Jun 22 '15 at 08:28) Yusuf20x

I'm referring to the LastErrorText property of the Chilkat.Crypt2 object - I have no idea what the error list is (or what language, or IDE you are using). I suspect that the Error list you are referring to show raised exceptions, but the Chilkat library doesn't work this way in order to be more cross-platform compatible.

Your language should have some way to copy text to the clipboard, so I recommend copying crypt.LastErrorText to the clipboard after calling SetEncodedKey (then paste it into a message here). Then, do the same after calling EncryptStringEnc (and paste the results here).

(Jun 22 '15 at 10:58) jpbro ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 21 '15 at 08:25

Seen: 1,146 times

Last updated: Jun 22 '15 at 10:58

powered by OSQA