943,668 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 3815
  • Java RSS
Dec 7th, 2007
0

How do you reverse mod?

Expand Post »
Hi,

I am wanting to reverse mod 128 or 255 on ASCII values, does anyone know how to do this?

Thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ivabigun is offline Offline
10 posts
since Dec 2007
Dec 7th, 2007
0

Re: How do you reverse mod?

You cannot really reverse a mod operation, as only the remainder of the division operation is retained.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,756 posts
since May 2007
Dec 7th, 2007
0

Re: How do you reverse mod?

So if i wanted to encrypt plaintext into full ASCII values and then decrypt back to plaintext how would i do this?

I was hoping to mod the plaintext by 255 and then reverse mod back again, but if this cant be done im pretty stumped
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ivabigun is offline Offline
10 posts
since Dec 2007
Dec 7th, 2007
0

Re: How do you reverse mod?

Well, if you are reducing a specific range (i.e. 256-511) by modding by 255, then yes you can get back to the number by adding the starting range value to the mod value. However, if your range exceeds 255 then you would lose the ability to reconstruct the value.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,756 posts
since May 2007
Dec 7th, 2007
0

Re: How do you reverse mod?

the length is dependant on the key and message (in a text file) length. Can anyone shed some light on how to encrypt these int arrays to ASCII values and then decrypt back to standard?

Thanks for your time
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ivabigun is offline Offline
10 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Java ME
Next Thread in Java Forum Timeline: Warning Window





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC