tidbyt / pixlet

Build apps for pixel-based displays ✨
https://tidbyt.com
Apache License 2.0
756 stars 107 forks source link

hmac: Add support to return base64 encoded HMAC. #1081

Closed fxb closed 2 months ago

fxb commented 2 months ago

Keeping the now kind of obsolte binary argument and adding a new encoding argument to allow directly encoding the resulting HMAC as base64.

This is needed as some APIs require base64 encoded HMACs, which are currently not possible to create, as starlib's base64 encoding only operates on strings.

fxb commented 2 months ago

Should I check for values other than "hex", "binary" and "base64" and error out?