Encrypt text in iPhone & decrypt it in your Rails server

What I did to perform the task is that i used RNCryptor in my IOS application.

And I engaged this gem to do the decryption in Rails.