Closed harin closed 9 years ago
Hi, I only provided PHP example(http://www.ideawu.com/blog/post/132.html ), you have to google for openssl command line example yourself.
There are some useful links in that post.
So I got it working. In case anyone wants to know the openssl
command to decrypt. What I missed was I had to convert the string to binary first then decrypt.
base64 -D -i -ios_output.txt -o ios_bin.txt
openssl rsautl -in -ios_bin.txt -out ios_decrypt.txt -decrypt -inkey private.pem
At first I tried using the base64 command of openssl but it didn't work.
Sorry for my ignorance, but what is the equivalent openssl command for to encrypt a string using this your code?
I have tried
openssl rsautl -in test.txt -out output.txt -encrypt -pubin -inkey public.pem
but gets different result from encrypting the same text using this library.
I am trying to verify that what I have encrypted in iOS will be able to decrypt using another library.
Thanks