bitcoin/bitcoin — pull request #1957 by dparrish (2012-10-25 04:38:53+00:00)
Title: Add signfile/verifyfile RPC calls.

These calls can be used to generate and check signatures for arbitrary
(potentially binary) files, much like signmessage / verifymessage.

The client should hash the file locally then send a uint256 in hex form
as the 2rd parameter to signfile and the 3rd parameter to verifyfile.

The other option would have been for the client to hash the file locally and send it to the server using the signmessage / verifymessage calls, but then the server would be signing a hash of a hash.

I'm new to the bitcoin code, so if there's a better way of doing this, let me know.

The functionality has been verified by one other person on IRC but it still could be wrong.