Please add a test for this, and for `shaToBytes` below.