jeramyRR
I am trying to decode an Azure Storage Key that’s supposedly base64 encoded, but I’m getting all kinds of wonkey characters. Example:
Base.decode64! "ZG2p8/z2ATu8NVLBXmeFtkX9chpkbk2EK9fH4qVKxvC//mSlIdsqzvZpNa4k7tPPR86RmiGkdi0BLwAEtPbkXA==" |> String.codepoints
Results in:
[
"d",
"m",
<<169>>,
<<243>>,
<<252>>,
<<246>>,
<<1>>,
";",
<<188>>,
"5",
"R",
<<193>>,
"^",
"g",
<<133>>,
<<182>>,
"E",
<<253>>,
"r",
<<26>>,
"d",
"n",
"M",
<<132>>,
"+",
<<215>>,
<<199>>,
<<226>>,
<<165>>,
"J",
<<198>>,
<<240>>,
<<191>>,
<<254>>,
"d",
<<165>>,
"!",
<<219>>,
"*",
<<206>>,
<<246>>,
"i",
"5",
<<174>>,
"$",
<<238>>,
<<211>>,
<<207>>,
"G",
"Α",
...
]
This definitely isn’t correct, or I’m not thinking about something correctly here. Is there something I need to do special for utf8 encoded strings?
Thanks for the help,
Jeramy
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #ai
- #graphql
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 5- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
massimo
It’s correct
the decoded string contains those characters
jeramyRR
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.
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-/\
jeramyRR
Looks like I may be able to remove all unprintable characters, but I’m not sure that’s going to work as far as Azure looking for the fully signed string using the full decoded shared key.
jeramyRR
We can close this thread. I got it figured out. There was nothing wrong with the key. There was however a mistake in my spelling.
massimo
base64decode.org is simply removing the non printable characters.
try on this one and see the difference https://codebeautify.org/base64-decode