I apologise for how it is split - there is a 10000 character limit, so this would not fit into one post.
Part I of IV
Well, I was having a lot of trouble learning b64 (mainly because all of the tutorials that I found weren't correct or thorough), so I decided (after learning what I believe the correct way is) to write a tutorial to help those who were in the same position as I was a while back….
Table of contents:
Intro
Beforehand
Things you should know
-Encoding b64
1-1 Writing the sentence(s)
1-2 Convert the text to 8-bit binary
1-3 Convert to 6-bit binary
1-4 Convert to decimal
1-5 Convert the decimal to ASCII, and put it all together
1-6 What's with the ='s?
-Decoding b64
Beforehand
2-1 Get rid of those pesky equal signs
2-2 Get the b64 decimal value
2-3 Convert to 6-bit binary
2-4 Convert 6-bit to bit stream, then convert to 8-bit
2-5 Convert to decimal number
2-6 Look it up
. . . . .
Base64 Encoding and Decoding Tutorials
By: Itsme
<intro_to_the_tutorial>
Well, I have been meaning to make this tutorial for some time, but I decided to write a tutorial to teach binary first, because knowledge of binary is needed for base64 encoding/decoding. Then, after breaking my wrist, I was really bored, so I decided to start on it. Then, after realizing that the whole tutorial was incorrect (after writing it, of course), I had to start over. And yes, it took a long time to type with one hand Now you're probably thinking: “Just teach me base64! I have a life you know, and I don't care about your wrist!†So here it is. Enjoy!
</intro_to_the_tutorial>
Beforehand: (Before doing either tutorial…)
Well, you don't really have to do any of this, but it may help you…a lot. I would recommend that you get out a piece of paper and pen/pencil, or open up your favorite text editor on you computer. You are going to need to write down, type, or remember a whole lot of information, so that's why I recommend writing/typing it. Trust me, it makes it a lot easier. Also, you should know that if I use the term “b64â€, that means “base64â€. In all of the examples, I was using a text editor, though it is not required.
Some things to know (about base64):
Base64 uses 64 (how did you guess?) characters to encode strings. ‘A-Z', ‘a-z', ‘0-9', ‘+', and ‘/' are the 63 real characters (without the ‘', of course), and the ‘=' sign is the padding, but we will get into that a little later. I just want to show you the chart of those characters and their b64 values, but I don't want you to be too confused before the tutorial actually starts…anyway, here is the chart:
You'll be using this a few times, so if I tell you to look at the b64 chart (yeah, what an original name), you'll know where to look. Right there.
-Another semi-interesting fact is that b64 is used to encode many e-mails etc. when sent. This is done because the computer might accidentally drop the last two bits if 8-bit binary is used, so when encoded into b64 it uses 6-bit (you'll learn about that later). The computer is less likely to drop those.
-Sometimes b64 is not used because of one big reason. The ratio of characters used is a 4/3 ratio, so when encoded, more space is needed which can slow down the time it takes the message to be sent. And now for the tutorial…
-b64 is NOT encryption, which is what most people think. You are actually encoding when you use b64. You're probably thinking, “What's the difference?†Well, the difference is that encryption takes a key, and encoding does not. That's not a big difference, but at least you can now correct people when they say they encrypted something in b64.
. . . . .
Part I of IV
Well, I was having a lot of trouble learning b64 (mainly because all of the tutorials that I found weren't correct or thorough), so I decided (after learning what I believe the correct way is) to write a tutorial to help those who were in the same position as I was a while back….
Table of contents:
Intro
Beforehand
Things you should know
-Encoding b64
1-1 Writing the sentence(s)
1-2 Convert the text to 8-bit binary
1-3 Convert to 6-bit binary
1-4 Convert to decimal
1-5 Convert the decimal to ASCII, and put it all together
1-6 What's with the ='s?
-Decoding b64
Beforehand
2-1 Get rid of those pesky equal signs
2-2 Get the b64 decimal value
2-3 Convert to 6-bit binary
2-4 Convert 6-bit to bit stream, then convert to 8-bit
2-5 Convert to decimal number
2-6 Look it up
. . . . .
Base64 Encoding and Decoding Tutorials
By: Itsme
<intro_to_the_tutorial>
Well, I have been meaning to make this tutorial for some time, but I decided to write a tutorial to teach binary first, because knowledge of binary is needed for base64 encoding/decoding. Then, after breaking my wrist, I was really bored, so I decided to start on it. Then, after realizing that the whole tutorial was incorrect (after writing it, of course), I had to start over. And yes, it took a long time to type with one hand Now you're probably thinking: “Just teach me base64! I have a life you know, and I don't care about your wrist!†So here it is. Enjoy!
</intro_to_the_tutorial>
Beforehand: (Before doing either tutorial…)
Well, you don't really have to do any of this, but it may help you…a lot. I would recommend that you get out a piece of paper and pen/pencil, or open up your favorite text editor on you computer. You are going to need to write down, type, or remember a whole lot of information, so that's why I recommend writing/typing it. Trust me, it makes it a lot easier. Also, you should know that if I use the term “b64â€, that means “base64â€. In all of the examples, I was using a text editor, though it is not required.
Some things to know (about base64):
Base64 uses 64 (how did you guess?) characters to encode strings. ‘A-Z', ‘a-z', ‘0-9', ‘+', and ‘/' are the 63 real characters (without the ‘', of course), and the ‘=' sign is the padding, but we will get into that a little later. I just want to show you the chart of those characters and their b64 values, but I don't want you to be too confused before the tutorial actually starts…anyway, here is the chart:
Code:
0 A 17 R 34 i 51 z
1 B 18 S 35 j 52 0
2 C 19 T 36 k 53 1
3 D 20 U 37 l 54 2
4 E 21 V 38 m 55 3
5 F 22 W 39 n 56 4
6 G 23 X 40 o 57 5
7 H 24 Y 41 p 58 6
8 I 25 Z 42 q 59 7
9 J 26 a 43 r 60 8
10 K 27 b 44 s 61 9
11 L 28 c 45 t 62 +
12 M 29 d 46 u 63 /
13 N 30 e 47 v (pad) =
14 O 31 f 48 w
15 P 32 g 49 x
16 Q 33 h 50 y
You'll be using this a few times, so if I tell you to look at the b64 chart (yeah, what an original name), you'll know where to look. Right there.
-Another semi-interesting fact is that b64 is used to encode many e-mails etc. when sent. This is done because the computer might accidentally drop the last two bits if 8-bit binary is used, so when encoded into b64 it uses 6-bit (you'll learn about that later). The computer is less likely to drop those.
-Sometimes b64 is not used because of one big reason. The ratio of characters used is a 4/3 ratio, so when encoded, more space is needed which can slow down the time it takes the message to be sent. And now for the tutorial…
-b64 is NOT encryption, which is what most people think. You are actually encoding when you use b64. You're probably thinking, “What's the difference?†Well, the difference is that encryption takes a key, and encoding does not. That's not a big difference, but at least you can now correct people when they say they encrypted something in b64.
. . . . .