henrinormak / Heimdall

Heimdall is a wrapper around the Security framework for simple encryption/decryption operations.
MIT License
402 stars 68 forks source link

RSA encryption #11

Closed ptmjanish closed 9 years ago

ptmjanish commented 9 years ago

i've just imported Heimdall as submodule. How can i encrypt my data using RSA encryption

henrinormak commented 9 years ago

You can look under the Usage in the README for further instructions. In short, Heimdall uses the approach outlined in this post, whereby a random key for AES is generated for each message, encrypted using the RSA keypair and prepended to the AES encrypted body of the message. It is important to note that to decrypt this message outside of Heimdall, you should look into Heimdall's code to understand how the exact size for the AES key is derived.

ptmjanish commented 9 years ago

I have followed the steps for importing Heimdall. But there is the error "No such Module "Heimdal"". How it can be overcome? Thanks in advance

henrinormak commented 9 years ago

Please have a look at the example application, unless you've made a typo in your comment, it should read (notice the double l's) "import Heimdall" at the top of your swift file. Also, make sure you have followed the appropriate steps under Installation

ptmjanish commented 9 years ago

Yes, I've already noticed the double l's, it's 'Heimdall' and the steps under installation using cocoapods is clearly followed. Still I don't understand where the problem is.

ptmjanish commented 9 years ago

I started another project to check the same. Here the error at "import Heimdall" is 'Cannot load underlying module 'Heimdall''. When i cleaned the project, it became the same previous error.'No such module'

henrinormak commented 9 years ago

It is difficult to diagnose the error without further information, please see if the example application works for you, if that is the case, perhaps you can figure out the difference based on that

ptmjanish commented 9 years ago

The same is the case in the example project. How this happens?

henrinormak commented 9 years ago

What version of Xcode are you using? I have just verified on Xcode 6.4 that the example application runs fine.

ptmjanish commented 9 years ago

Xcode 6.4

henrinormak commented 9 years ago

Sorry, but I don't know how to help you, I suspect you have messed up your configuration somehow, similar issues have been reported on other projects (such as AlamoFire)

As the example project works (for me as well as for other users of this code), then there is nothing else I can do to help you.

ptmjanish commented 9 years ago

I started another new project and it works good. Couldn't find what the issue was, but thanks for the valuable informations