Encryption Algorithm
I'm currently working on an encryption project that uses a key and only standard ascii characters. It basically adds the character to be encrypted to a character in the key. The problem is I can only use standard ascii characters 32 - 126. When I add the two values, I end up with a minimum value of 64, and a maximum value of 252. In order to get the new values back within range I have tried to subtract 126, but this often time returns values < 32. I've tried division (by 2), but I lose precision and accuracy when trying to decrypt. If anyone has done something like this before and has any tips I would appreciate them.
I'm currently working on an encryption project that uses a key and only standard ascii characters. It basically adds the character to be encrypted to a character in the key. The problem is I can only use standard ascii characters 32 - 126. When I add the two values, I end up with a minimum value of 64, and a maximum value of 252. In order to get the new values back within range I have tried to subtract 126, but this often time returns values < 32. I've tried division (by 2), but I lose precision and accuracy when trying to decrypt. If anyone has done something like this before and has any tips I would appreciate them.