I needed a base64 encoder for a web api. But in Thunkable X I did not find any component to suit my needs. Also sending username and passwords to an external API was too insecure for me. I found two solutions to this problem.
First Solution:
This implies having access to a hosting service where you could host a PHP script that would do the conversion for you and WebAPI componnent. PHP Script:
Another problem is that it is not possible to copy blocks between projects in Thunkable X. How many users do you think will want to manually create large function blocks for their project? I think very few.
Aaa ok. To work also with other characters beside the standard ASCI you need to update the list for ASCI code and after will work.
Copy/paste function is a Thunkable issue. For example I did copy the blocks one by one to another project because first time I was using http://api.foxtools.ru, but i need to encode username and password, so sending them to an obscure site that is not even https did not look very safe to me(noob here not expert in security).
In the end is another way to look at the problem till a proper crypto block will be implemented in thunkable.
To encode a password, they use not a base64, but a cryptographic function. There are universal decoders with which it will not be difficult to get a password from your base64 string.
as an alternative, you can use the code i used in this simple base64 encoder/decoder - if youâre converting short strings (not files!). click on the link below.
Thanks for the suggestion. Unfortunately I need a Base64 encoder for images. Iâm converting small thumbnail images to Base64 so I can save it locally in a local storage so the app can still be used offline. Any other suggestion?
Also, will this work for an image thatâs stored in Cloudinary? I used to use the [http://api.foxtools.ru] and I supply the URL of the image. The sample you showed looks like it accepts a text then it converts to Base64. What I need it a BAse64 encoder that accepts URL of the image then it returns the Base64 string.
Thanks! Iâll try the javascript solution but I think the best solution for me is to find another API that encodes imageURL to Base64 like what [http://api.foxtools.ru] does. Iâve been searching for days and I cannot find any. Iâve searched in RapidAPI, Google APIs, Amazon, or Microsoft but no luck. Itâs weird that no one else provides a simple API that encodes an image to Base64. I just saw some online tools but they donât have API endpoints.