Type in any of these to trigger some stuff: X: asks for two strings, which it will XOR C: enCodes a decimal number into base64 D: Decodes a base64 number into decimal E: Encrypts a base64 string with a key (it is symmetrical encryption, so if you encrypt X with Y to make Z then encrypting Z with Y will make X) All of the results will pop up in the Global Function Output! Btw, XOR is commutative, so X XOR Y = Y XOR X = Z. Additionally, X XOR Z = Y, and Y XOR Z = X.
Starts with yapping, scroll down for technical stuff: Originally inspired by @igtnathan5 and his project Scratch Clicker, this code was made entirely by me. This started as a thing I wanted to make because of bad save-file encryption, but I have plans on extending it in the future. You can use this in your own project, but pls credit me in the credits section. This is intended to be used for encryption functionalities, and while encryption is weak, it provides a baseline level of defense against ppl who want to cheat ur save-system. It should hopefully be intuitive to integrate, but pls remember to remove the X, C, D, and E stuff when integrating. All of the stuff is in 1 sprite. Also it currently doesn't support negatives cus I forgor to implement them lmao. How it work???: uses code, logic, lists, vars, and much math to convert numbers to and from base64. This is not the same as standard base64 due to scratch not supporting case sensitivity in string comparisons, and also because of some potential future plans I have involving the character set. There are about 65 major chars on a keyboard that I could find. I had to exclude one, and that one is $. KNOWN BUGS: Encoding a decimal number into base64 doesn't actually check if number is decimal, and thus returns a blank to the GFO (Global Function Output) instead of throwing an error. Change Log: V1: release V1.0.1: patched the C button to work