vbuterin/pybitcointools — pull request #1 by Syriven (2013-09-20 17:42:22+00:00)
Title: Added numToVarInt to support message signing for len > 253

I needed support for longer message signing, so I implemented the Bitcoin protocol's numToVarInt and used it instead of chr in electrum_sig_hash.

It's worth noting that this implementation doesn't work with brainwallet.org's sig verify, but that's because brainwallet.org doesn't use the protocol's implementation.

I'm not an expert in this stuff, so it might be inefficient, but it gets the job done when longer messages are used.