CodeBase64 Explanation

I need to understand CodeBase 64.  If I CodeBase 64 a simple string like "Hi there", is there a one to one mapping between the encoded letters and each character?
lcorAsked:
Who is Participating?
 
jkrConnect With a Mentor Commented:
Yes, there is a "one to one" mapping. For more details, see http://en.wikipedia.org/wiki/Base64
0
 
mokuleCommented:
No, there is no one to one mapping
0
 
mokuleConnect With a Mentor Commented:
For example MMM is encoded TU1N
0
 
Infinity08Connect With a Mentor Commented:
mokule, 1-to-1 means that a string encoded in Base64 can be decoded again to the same string, and ONLY that string. ie. a string corresponds to one encoded Base64 string, and vice versa.

So, what jkr said is correct ... there is a 1-to-1 mapping between a string and its Base64 encoding.

However, if lcor wanted to know whether 1 character corresponds to one encoded character, then that's not true. Each block of three characters however will always have the same encoded result. And then you're correct, mokule ...
0
 
bijopuliConnect With a Mentor Commented:
Hi lcor

are u asking bout base64 encoding:
if it is so here are the links for u:

An intro on Base64:

http://email.about.com/cs/standards/a/base64_encoding.htm

A nice tool to experiment:

http://www.motobit.com/util/base64-decoder-encoder.asp

code in c++:

http://www.marcsweb.com/mnweb_ccppbase64.shtml

Regards
Bijo.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.