Using the wrong encoding flips the bytes. We have to use sha256 as the spec says to prevent them from flipping.