Hi,

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

Thanks

You cannot really reverse a mod operation, as only the remainder of the division operation is retained.

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 :S

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.