fix pad/hash lengths