@xavierpi has added Base64 capability into Snap! via the MQTT library
https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=newBase64&editMode
@xavierpi has added Base64 capability into Snap! via the MQTT library
https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=newBase64&editMode
wow!
If anyone just wants the Base64 blocks then just import this
nice, really useful.
Continuing the discussion from Base64 reporters:
I meant to post this in the original topic, but it was locked before I could do so.
So, from what I understand, this uses Javascript in the form of an extension block to encode/decode the Base64. But, could a decoder/encoder be built in pure Snap? Maybe we could even work on one as a community, make it a collaboration. Would anybody even be interested in this?
Sure, we have the above, but it's still cool to see what we can do with vanilla Snap!, right?
And since it's (probably) just an algorithm, surely it can't be that hard
I made one a while ago
4 posts were split to a new topic: Other methods of encryption
It would be possible if you know how it is encrypted.
It's easy to encode Base64 - basically split text from 8 bits to 6 bits:
Hello World!
01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100 00100001
turns into
010010 000110 010101 101100 011011 000110 111100 100000 010101 110110 111101 110010 011011 000110 010000 100001
which is
18 6 21 44 27 6 60 32 21 54 61 50 27 6 16 33
And it follows a Base64 table:
Which means "Hello World!" in Base64 is SGVsbG8gV29ybGQh
(Yes, I wrote the Base64 text from hand )
You can even prove it with the block:
And from decoding it, it's the same steps, just backwards. So Base64 encoding & decoding is pretty much a straightforward process.