To be able to properly limit the length of hash string we should limit after encoding to base, not before.