×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    50

    Encryption in J2me and decryption in C# ??

    Hi,

    I am having a small j2me application from which i am sending a SMS in Encrypted form and i want to decrypt that SMS on server ,which is having a C# application.

    I am using a same encryption and decryption algo for C# and j2me application. But the string which is encoded from j2me gives a diffrent value/String after decrypting using C#.

    Does anyone have a algoritham which works same for j2me and C#.

    any codesnippest appriciated.
    Please help ..

    Thanks

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Encryption in J2me and decryption in C# ??

    Hi iworktech_kiran,

    this sounds like an encoding problem. Have you checked that the Java ME encoded String is equal to the one received by your C# algorithm (so, the middle Strings, not the decoded ones)?

    Pit

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    50

    Re: Encryption in J2me and decryption in C# ??

    Hi, Pit

    Thank you for your reply..

    Yes, I checked with Decoded string from both C# and j2me app.
    The string generated is different..

    I am using a int value in both app for encoding/decoding...

    And java int and C# int is having different range, Is that causing the problem..

  4. #4
    Nokia Developer Champion
    Join Date
    Sep 2007
    Posts
    915

    Re: Encryption in J2me and decryption in C# ??

    Ya it might creating problem. One option is that you can use XML.

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Encryption in J2me and decryption in C# ??

    So, to be sure I've correctly understood, you have this scenario:

    Java ME app: "original text" -> "encodedtext"
    C# app: "encodedtext" -> "original text"

    In your case the encoded text in the Java ME app is different than the encoded text received from C# app, right?
    If it is so, you should double check both for possible encoding issues and for differences in the 2 algorithms.

    Pit

Similar Threads

  1. Encryption for j2me midlet application
    By iworktech_kiran in forum Mobile Java Networking & Messaging & Security
    Replies: 5
    Last Post: 2008-06-18, 11:35
  2. encryption
    By glamalil in forum Mobile Java General
    Replies: 2
    Last Post: 2007-10-20, 05:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×