varnish / libvmod-digest

Digest and HMAC vmod
Other
50 stars 27 forks source link

Optionally return hash_*() and hmac_*() functions as base64 encoded values #4

Closed ericbuehl closed 8 years ago

ericbuehl commented 10 years ago

As far as I can tell the only format returned by the various digest methods is a hex encoded string. Is it easy to retrieve a base64 encoded version of the same data? Perhaps either:

a) an additional parameter to each hash/hmac function that indicates the desired string format

-- or --

b) a new set hex/base64 util functions

lkarsten commented 9 years ago

Reviewing old open issues.

Is this still needed? Could this be solved by having a base64 encoder/decoder available in VCL?

ericbuehl commented 9 years ago

Possibly. The motivation was to be able to generate AWS authentication signatures directly from VCL to allow things such as direct S3 uploads from Fastly's edge servers bypassing origin alltogether. I'm not working on this project any more, but I imagine it could be quite useful for others.

rezan commented 8 years ago

Completed, master only. Added base64*_hex() functions to decode the hex string into the raw binary form before base64 encoding.