Avoid a bunch of copying/conversion in script/sign
Merge pull request #5210

1f84793 Avoid a bunch of copying/conversion in script/sign (Pieter Wuille)