login about faq

I am trying to use Chilkat Encryption Library in iOS. I am using 3DES in CBC mode. Is it possible to encrypt with 'zero padding' ilke in .NET?

asked Oct 03 '12 at 12:31

rishabht's gravatar image

rishabht
1222


See the online reference documentation for PaddingScheme. Here it is reproduced:

Possible values are:

0 = RFC 1423 padding scheme: Each padding byte is set to the number of padding bytes. If the data is already a multiple of algorithm's block size bytes, an extra block is appended each having a value equal to the block size. (for example, if the algorithm's block size is 16, then 16 bytes having the value 0x10 are added.). (This is also known as PKCS5 padding: PKCS #5 padding string consists of a sequence of bytes, each of which is equal to the total number of padding bytes added. )

1 = FIPS81 (Federal Information Processing Standards 81) where the last byte contains the number of padding bytes, including itself, and the other padding bytes are set to random values.

2 = Each padding byte is set to a random value. The decryptor must know how many bytes are in the original unencrypted data.

3 = Pad with NULLs. (If already a multiple of the algorithm's block size, no padding is added).

4 = Pad with SPACE chars(0x20). (If already a multiple of algorithm's block size, no padding is added).

link

answered Oct 03 '12 at 13:04

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks for the prompt reply. But, none of the options seems to implement 'zero padding' in the encryption. Is that right?

(Oct 03 '12 at 13:12) rishabht

Got it...!!! I had to use '3' for implementing zero padding. Thank you so much....!!!

link

answered Oct 03 '12 at 13:19

rishabht's gravatar image

rishabht
1222

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×94
×64

Asked: Oct 03 '12 at 12:31

Seen: 1,471 times

Last updated: Oct 03 '12 at 13:19

powered by OSQA