staticfloat/Nettle.jl — pull request #26 by samoconnor (2014-07-25 11:05:49+00:00)
Title: Convenience Functions for one-line hashes and hmacs

Hi staticfloat,

I've started porting my Tcl AWS library to Julia as a learning exercise.
(This is my second day using Julia, so please let me know if my code is stylistically broken in some way.)

I've added some convenience functions to Nettle.jl so that I can hash and hmac in-line more easily. e.g.

canonical_hash = bytes2hex(sha256_hash(canonical_form))
string_to_sign = "AWS4-HMAC-SHA256\n$datetime\n$scope\n$canonical_hash"
signature = bytes2hex(sha256_hmac(signing_key, string_to_sign))

I also simplified hexdigest!() by using bytes2hex.