What happens is that the binary data is broken up into from 8-bit bytes into 6-bit segments. These are then replaced by ASCII characters. In the following, the start of the second line in the above example is encoded.
Decimal | 57 | 55 | 32 | 72 | 101 | 97 | ||||||||||||||||||||||||||||||||||||||||||
Hex (base 16) | 39 | 37 | 20 | 48 | 65 | 61 | ||||||||||||||||||||||||||||||||||||||||||
Binary | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
Index | 14 | 19 | 28 | 32 | 18 | 6 | 21 | 33 | ||||||||||||||||||||||||||||||||||||||||
Base64 Encoded | O | T | c | g | S | G | V | h |
You can end up with a file looking something like this:
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.17 (MingW32)
lLtwfrsSgnpfUzopSdKcJjAfA1KE6SFTASBoH8JpnXV4AMrmMJVteTpeXr2nftHq
N8BUidauDqNvhKLADWWm5VhvnD7pkbNUv9nshW3SBT3jtmM/xxB3dNxeIfmSc78T
Z5jlEAjHVpS36KJNZSX+tn4fh8TDiTaw/yFOPxdZmwRXdN+fxAvao0/qq+dfsLQw
U5ELc/RavLf01iYwUrrdu97DUJwoLJIh/rxk2hdjgLY8cZRRexmGugb/tvojbq2L
EdOwa4d1gvDX/DYkYeOC4cCiACqwtTIk8IF+aqfrQ9BN2aVD0iuwm0QKqLsRNgxp
YMjtmF9T3UDmotfVsCNxx/HEaGwhU16VP+td9auMTVD124iQkeGFZfNMNynaeizp
bfRe5+OrzmyKVV/evQVlrHXag3RpG4UQx8yed/R+Ed7opd9KZgKT
=76xn
-----END PGP MESSAGE-----
No comments:
Post a Comment