Base64 Code Description

Source: Internet
Author: User
Tags clear screen

Base64 Code Description
The BASE64 encoding requires the conversion of 3 8-bit bytes (3*8=24) into 4 6-bit bytes (4*6=24), followed by 6 two in front of 0 bits, forming a 8-bit byte form.

If the remaining characters are less than 3 bytes, then 0 is populated with the output character using ' = ', so there may be 1 or 2 ' = ' At the end of the encoded text output.

To ensure the output of the encoded bit-readable characters, BASE64 developed an encoding table for uniform conversion.

  The size of the encoded table is 2^6=64, which is also the origin of the Base64 name.


  

" abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789+/ "; //
Prototype: extern int isalnum (int c); Function: Determine if the character variable C is a letter or a numeric description: When C is a number 0-9 or letter A-Z and a-Z, returns a value other than 0, otherwise returns zero.
#include <syslib.h>/*<ctype.h> included*/#include<ctype.h>/*<ctype.h> included*/Main ()/*"main" function*/{    intC/*integer C;*/CLRSCR (); //Clear Screen () foreign language full name plus abbreviation: Clear screensC='a';/*assigning values to variables*/printf ("%c:%s\n", C,isalnum (c)?"Yes":"No");/*"Format output" (Foreign language full name plus abbreviation: printf)*/C='7';/*assigning values to variables*/printf ("%c:%s\n", C,isalnum (c)?"Yes":"No"); C='@';/*assigning values to variables*/printf ("%c:%s\n", C,isalnum (c)?"Yes":"No"); GetChar ();/*gets the character ();*/    return 0;/*returns 0; normal exit*/}

Base64 Code Description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.