Fork me on GitHub
#babashka
<
2020-11-15
>
Travis Jefferson03:11:29

Hello! I’m trying to “hand-craft” a signed AWS HTTP request following these instructions https://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html One blocker that I’m hitting is the HMAC SHA256: looks like it’s possible via java.crypto, which isn’t part of bb I do also see that https://funcool.github.io/buddy-core/latest/02-mac.html supports it as well (presumably via java.crypto)

Travis Jefferson03:11:43

I just had the idea to shell out to openssl directly, which seems like a super reasonable approach for my tinkering needs $ echo -n "value" | openssl sha256 -hmac "key"

borkdude11:11:03

I think we could maybe have a pod around buddy / security (provided this is only data in / data out)

borkdude11:11:02

but shelling out to openssl is a nice way too

🎉 1
Travis Jefferson13:11:32

I’m happy with shelling out :thumbsup: up to you (of course) if/when to try incorporating `java.security` java.crypto🙂 I trust you

borkdude13:11:11

It already has some java.security classes (for calculating SHA-256), just not java.crypto

👍 1
Travis Jefferson13:11:30

yes, sorry, that’s what I meant

borkdude13:11:45

If it comes up more often, I'll consider it. Thanks!

❤️ 1