login about faq

We referred this link to encrypt a file using AES algo: http://www.example-code.com/objc/crypt_aes_encrypt_file.asp

Here hardcoded keyHex and ivHex are used to encrypt a file.

Now I have couple of related questions

  1. Is there any method to generate random keyHex and ivHex in chilkat library? Basically each time we want a unique keyHex and ivHex pair to be used to encrypt-decrypt a file.
  2. How shall we share the generated keyHex and ivHex pair to android device and vice-versa? We are planning to share it to other user after encrypting it with his public key (RSA algo)? Do we need to first encrypt keyHex and then ivHex using public key and share both across?

asked Jun 04 '14 at 09:53

Miraaj's gravatar image

Miraaj
21125


The GenRandomBytesENC method can be called to generate N random bytes and return them as an encoded string (using Base64, hex, etc.)

A typical way of having a shared secret (i.e. a shared symmetric key where only the two parties know the key) is via RSA. See this: http://www.example-code.com/objc/rsa_keyExchange.asp

link

answered Jun 06 '14 at 08:50

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

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:

×48
×33
×7
×2

Asked: Jun 04 '14 at 09:53

Seen: 1,323 times

Last updated: Jun 06 '14 at 08:50

powered by OSQA