FACTOID # 34: Ethiopians are by far the most agricultural people on earth (both men and women)
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Base 64

In computing, base64 is a data encoding scheme whereby binary-encoded data is converted to printable ASCII characters. It is defined as a MIME content transfer encoding for use in internet e_mail. The only characters used are the upper_ and lower_case Roman alphabet characters (A_Z, a_z), the numerals (0_9), and the "+" and "/" symbols, with the "=" symbol as a special suffix code.


Full specifications for base64 are contained in RFC 1421 and RFC 2045. The scheme is defined only for data whose original length is a multiple of 8 bits, a requirement met by most computer file formats. The resultant base64-encoded data has a length that is approximately 33% greater than the original data, and typically appears as seemingly random characters.


To convert data to base 64, the first byte is placed in the most significant eight bits of a 24-bit buffer, the next in the middle eight, and the third in the least significant eight bits. If there are fewer than three bytes to encode, the corresponding buffer bits will be zero. The buffer is then used, six bits at a time, most significant first, as indices into the string "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" and the indicated character output. If there were only one or two input bytes, the output is padded with two or one "=" characters respectively. This prevents extra bits being added to the reconstructed data. The process then repeats on the remaining input data.


For example, the (historic) Wikipedia slogan,

Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.

encoded in base64 is as follows:

 TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0 aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1 c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0 aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdl LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4= 

Basic spam scanners which do not decode Base64 messages will often pass messages in Base64 since they appear random enough, or do not contain keywords in the Base64 text to be spam.



Modified Base64 is a data encoding scheme whereby characters above 0x80 (hexadecimal notation) are encoded using printable ASCII characters. It is a variant of Base64, and is primarily used for encoding Unicode text into UTF-7 format for use in MIME messages. See UTF-7 for examples.


Modified Base64 is standardized as RFC 1642, A Mail-Safe Transformation Format of Unicode.


The main difference it has versus Base64 is that it does not use the "=" symbol for padding, as that character tends to require a fair amount of escaping. Instead, it pads the octet bits with 0s.


See also

External links

  • RFC 1421 (Privacy Enhancement for Electronic Internet Mail)
  • RFC 2045 (MIME)
  • RFC 3548 (The Base16, Base32, and Base64 Data Encodings)
  • Source code for the base64 algorithm (http://base64.sourceforge.net)

Resources







  Results from FactBites:
 
Midas: C source code for Base 64 (297 words)
ere's the C source code for the Base 64 encoder/decoder.
Also send email if you think this isn't a compatible implementation of Base 64 encoding.
This page was last built with Frontier on a Macintosh on Wednesday, August 27, 1997 at 7:34:51 PM.
Re: Base 64 encoded data... (153 words)
Redirect the output to a new LDIF file or append to an existing LDIF file.
I understand that to do this I need to treat the data as > Base 64 encoded data.
However, how do I convert my data to base 64 > encoded data and more importantly how do I convert is back to the > original format after I retrieve the base 64 encoded data via an > ldapsearch?
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.