Fixing steps to pad hash

This commit is contained in:
ShrCaJesmo
2020-03-03 13:54:45 -05:00
committed by GitHub
parent 72d2dc0239
commit 1a235becf4

View File

@ -67,10 +67,10 @@ So, as an example (this is not a device hash, but it's misaligned unpadded Base6
Now for the padding rules. The padding character is "=". The padding character can only be at the end of the hash, and there can only be a maximum of 2 padding characters. Here's the basic logic. Now for the padding rules. The padding character is "=". The padding character can only be at the end of the hash, and there can only be a maximum of 2 padding characters. Here's the basic logic.
- Does decoding the hash fail? - Does decoding the hash fail?
- Yes: Are the last two characters "="? - Yes: Are the last two characters "="?
- Yes: Replace both "=" with a single "A" character, then try again - Yes: Replace both "=" with a single "A" character, then try again
- No: Add another "=" character at the end, then try again - No: Add another "=" character at the end, then try again
- No: That hash is valid - No: That hash is valid
Looping the logic above on the previous example hash, we get the following permutations: Looping the logic above on the previous example hash, we get the following permutations:
- Q29udG9zbwAAA - Q29udG9zbwAAA