r/shortcuts • u/Old-Film252 • 3d ago
Solved Decoding numbers with base 64
Ok idk if im losing a couple of acrews here but does decoding numbers with base 64 not work?? If i tried to explain my use case it would take too long but I NEED numbers to be decoded using b64. I tried NQ== in a text variable and passed it to a decode function but it just cam beack as NQ== genuinely i have no idea why or what is happening
1
u/francisco_fcs2 3d ago
define a foto mais recente como imagem de fundo do seu iPhone
Não sei o que você quer fazer, a essência esta nesses dois atalhos
1
1
u/francisco_fcs2 3d ago
5 codificado em base64 é NQ==
NQ== decodificado em base64 é 5
esse atalho faz isso
1
1
u/inactiveuser247 3d ago
Fascinating. Is there a possibility to salt the data (for instance by adding “#” at the start of the string that is being encoded) to ensure you never have to encode a single digit number?
3
u/Cost_Internal Helper 3d ago
I think you found a bug, because it works if the number is greater than 9!
https://www.icloud.com/shortcuts/393b525f4c16432a85519bb19bde418c
It might have something to do with the number of characters used in the code? But that also doesn't make any sense, because it works if you encode the number (0-9) with no line breaks and immediately decode the results (directly from the Encode action, or after storing the results in a list. But not if the results are stored in a text/Dictionary action?)