1

I have to encrypt the username and password for a native Apple application. But the server side is in Java, so the same encrypted fields have to be decrypted using Java.

I am new to cryptography, and I don't know how to go about it. One option that has come to my mind is to take any algorithm in Java, understand the source code for encryption, apply the same logic to convert the source in Objective C, and decrypt the encrypted text using the already provided decryption algorithm. But a minor mistake would ruin my application.

Is there any other way? Is an algorithm whose encryption is in Objective C and decryption is in Java or something like that?

3 Answers 3

3

The most common encryption algorithms (such as AES) will have implementations in objective-c and Java. Pick the algorithm you want to use and Google for an implementation.

Sign up to request clarification or add additional context in comments.

Comments

3

You can use ssl to encrypt the traffic at the socket level. Or you could use a public key algorithm as described in this SO post: RSA Encryption-Decryption in iphone

Comments

0

Perhaps the answer is communicate with your server should be running over SSL. Then all the traffic between your client and the server is encrypted.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.