Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- H e l l o
- 48 65 6C 6C 6F
- 48 - 0100 1000
- 65 - 0110 0101
- 6C - 0110 1100
- 6C - 0110 1100
- 6F - 0110 1111
- So we get 0100100001100101011011000110110001101111, which is 40 bits long. Num of 0's to pad to left = 40 % 5 = 0
- Base32 Table:
- 0 00000 0
- 1 00001 1
- 2 00010 2
- 3 00011 3
- 4 00100 4
- 5 00101 5
- 6 00110 6
- 7 00111 7
- 8 01000 8
- 9 01001 9
- 10 01010 A
- 11 01011 B
- 12 01100 C
- 13 01101 D
- 14 01110 E
- 15 01111 F
- 16 10000 G
- 17 10001 H
- 18 10010 I
- 19 10011 J
- 20 10100 K
- 21 10101 L
- 22 10110 M
- 23 10111 N
- 24 11000 O
- 25 11001 P
- 26 11010 Q
- 27 11011 R
- 28 11100 S
- 29 11101 T
- 30 11110 U
- 31 11111 V
- 01001 - 9 - 9 - 9
- 00001 - 1 - 1 - 1
- 10010 - 9*2 - 18 - I
- 10110 - 9*2+4 - 22 - M
- 11000 - 6*4 - 24 - O
- 11011 - 6*4+3 - 27 - R
- 00011 - 3 - 3 - 3
- 01111 - 15 - 15 - F
- 91IMOR3F
- This is how to manually encode/decode a string.
- To decode a string, convert each base 32 character back into their respective 5-bit groups, count the number of bits n, n % 4 = number of 0's to remove from left of string. Then convert that binary string back into ASCII.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement