When an input (file, typed-string) is processed with a HASH function, the rendered
result can be displayed in several format.
The most communly used is the Hexadecimal representation or Base16.
96Crypt provides 3 different display format that can be changed on-the-fly.
- 1. Base16
Base16 (Hexadecimal) is the most used format to display HASH function results.
As each 4 binary bits (nibble) are represented in 1 hexadecimal digit,
0[decimal] -> 0000[binary] -> 0[hex] up to
15[decimal] -> 1111[binary] -> F[hex]
the Base16 result will be much shorter (1/4) than the binary format.
Once the HASH results are rendered and displayed on your screen, you might
simply click on the "Display Mode" box placed on the upper right corner and select
"Digest Base16".
- 2. Base64
Base64 is a method of encoding arbitrary binary data as ASCII text.
This is necessary for sending files via Internet email, which can only
handle 6-bit ASCII text.
Since Base64 encoding divides every group of 3-byte (3 x 8 = 24bit) of the original
data into 4 x 6-bit ASCII text (4 x 6 = 24bit), the encoded result is typically about one
thrid bigger. 6-bit ASCII text represents a max of 64 bits hence the name Base64.
Here's an example of encoding in Base64.
Let us consider the following sequennce BCD and encode it in Base64.
The ASCII character B is equal to 66[decimal] or 0100 0010[binary]
The ASCII character C is equal to 67[decimal] or 0100 0011[binary]
The ASCII character D is equal to 68[decimal] or 0100 0100[binary]
The resultant bit-stream of the 3 bytes is
0100 0010
0100 0011
0100 0100
This can be represented as 4 x 6-bit -->
010000 10
0100 0011
01 000100
Let's convert each block of 6-bit to decimal
16
36
13
4
From the Base64 encoding table shown below we replace every decimal value
by its ASCII code and we get the final result QkNE
Therefore the sequence
BCD is encoded to
QkNE in Base64 (it is one third bigger).
| Value |
Char |
|
Value |
Char |
|
Value |
Char |
|
Value |
Char |
| 0 |
A |
|
16 |
Q |
|
32 |
g |
|
48 |
w |
| 1 |
B |
|
17 |
R |
|
33 |
h |
|
49 |
x |
| 2 |
C |
|
18 |
S |
|
34 |
i |
|
50 |
y |
| 3 |
D |
|
19 |
T |
|
35 |
j |
|
51 |
z |
| 4 |
E |
|
20 |
U |
|
36 |
k |
|
52 |
0 |
| 5 |
F |
|
21 |
V |
|
37 |
l |
|
53 |
1 |
| 6 |
G |
|
22 |
W |
|
38 |
m |
|
54 |
2 |
| 7 |
H |
|
23 |
X |
|
39 |
n |
|
55 |
3 |
| 8 |
I |
|
24 |
Y |
|
40 |
o |
|
56 |
4 |
| 9 |
J |
|
25 |
Z |
|
41 |
p |
|
57 |
5 |
| 10 |
K |
|
26 |
a |
|
42 |
q |
|
58 |
6 |
| 11 |
L |
|
27 |
b |
|
43 |
r |
|
59 |
7 |
| 12 |
M |
|
28 |
c |
|
44 |
s |
|
60 |
8 |
| 13 |
N |
|
29 |
d |
|
45 |
t |
|
61 |
9 |
| 14 |
O |
|
30 |
e |
|
46 |
u |
|
62 |
+ |
| 15 |
P |
|
31 |
f |
|
47 |
v |
|
63 |
/ |
If the size of the original data in bytes is a multiple of three, everything works fine.
But what if it isn't? like BCDE.
As the Base64 encoding processes a group of 3-byte (3 x 8bit) at a time, the
solution is to append enough bytes with a value of '0' to complete to 3-byte group.
These trailing '0's are NOT encoded using the Base64 encoding table. They are rather
padded as a "=" character appearing at the end of encoded data.
To convert the HASH result to Base64 using 96Crypt, all you need is a simple click on
the "Display Mode" box placed on the upper right corner and select "Digest Base64".
Note:
The Base64 format provided by 96Crypt is derived from the ASCII not from the Hexadecimal representation.
- 3. ASCII
American Standard Code for Information Interchange
(ASCII)
is the numerical
representation of a characters. The first 32 codes are non-printing characters, this
makes this choice a bit harder to manipulate. However, if printing the results
cannot always be successful, saving them to a file can be easily done.
Once the results are rendered and displayed on your screen, you might simply
click on the "Display Mode" box placed on the upper right corner and select
"Digest ASCII".
Note:
When opening 96Crypt, it will auto-position on the last display mode selection that
was saved the last time 96Crypt was closed.
Save/Print HASH Results
Copyright 2002 -
© eRightSoft