Skip to content Skip to sidebar Skip to footer

I'm Getting Slightly Different Hmac Signatures Out Of Clojure And Python

The HMAC SHA1 signatures I'm getting from my python implementation and my clojure implementation are slightly different. I'm stumped as to what would cause that. Python implementat

Solution 1:

The part of your Clojure code that translates bytes to hex strings drops leading zeros.

You could use a format string that maintains a leading zero ("%02x"), or use a proper hex encoding library, such as Guava or Commons Codec.

Post a Comment for "I'm Getting Slightly Different Hmac Signatures Out Of Clojure And Python"