Update to allow raw (as a string) private key in digest

Here is a quick trick I used to make it accept private key as a string, which is especially useful on Heroku.

I'm developing client application which needs communicate to the Xero Partners API which uses a combination of 3-legged authorisation, private key message signing and client-side SSL certificate signing.