Why use substring instead of just ensuring key is exactly 32 byte long?