Click here to Skip to main content
15,889,691 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
How to get encoding/decoding code written in c++. Thanks.
Posted
Comments
Peter_in_2780 23-Nov-10 20:48pm    
You will need to give us a better description of what you are trying to do. encoding/decoding what to/from what?

The simpliest way to encode/decode array of numbers (BYTE *) is to use xor operation.

a xor b = c - encode
c xor b = a - decode

Here
a - source byte
b - key byte
c - encoded byte

You can use DWORD also.
 
Share this answer
 
v3
use Base64Encode and Base64Decode for encoding and decoding resp.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900