I’m unable to use the decoded string to reencode other strings it seems. When I try to create a signature using :crypto.hmac(:sha256, decoded_shared_key, “This is a test”) I get back gibberish again.
shared_key = "ZG2p8/z2ATu8NVLBXmeFtkX9chpkbk2EK9fH4qVKxvC//mSlIdsqzvZpNa4k7tPPR86RmiGkdi0BLwAEtPbkXA=="
decoded = Base.decode64! shared_key
:crypto.hmac(:sha256, decoded, "This is a test")
<<22, 6, 194, 235, 170, 235, 226, 199, 1, 90, 191, 4, 222, 153, 97, 47, 90, 238,
217, 126, 252, 23, 12, 117, 221, 127, 150, 78, 14, 236, 193, 141>>
That binary returned again contains invalid characters that aren’t recognized on the other side of my http request.
This is baffling me, because none of the other azure sdks (ruby, java, go, c#) have any problem with these keys.
Even using https://www.base64decode.org/ comes out fine.
base64decode results: dm;5R^gErdnM+Jd!*i5$GΑ!v-/\


















