? Encryptor/Decryptor ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password
Creep into the Halloween / Horror Programming Contest (Deadline Extended)

Encryptor/Decryptor

Submitted
Updated
Author
12Me21
Public Key
4R34P3ED
Min. Compat.
All
Rating
5 votes
Description The code: INPUT F$,K$RANDOMIZE 0,LEN(K$)F$="TXT:"+F$T$=LOAD(F$,0)FOR I=0TO-1+LEN(T$)E=ASC(T$[I])XOR ASC(K$[RND(LEN(K$))])IF E-13THEN T$[I]=CHR$(E)ENDIF:NEXT:SAVE F$+".",T$'12Me21 (I'll upload it later) It uses XOR encryption, but instead of using each character of the key sequentially, it randomizes them, using the length of the password as a seed. Instructions Put the program inside the project folder, then run it. INPUT the file name, password It will save the program as NAME$+"." To decrypt, do the same thing.
Categories
Keywords
12 Comment(s) User1_ User1_ how do i encrypt a grp file Guzzler Guzzler First Week Joined in the very first week of SmileBASIC Source Website Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength So, does this let us put copy written material onto the server as long as it's encrypted? 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS I guess so... but that wasn't the original intent. I made this to keep secret programs hidden from other people,. Guzzler Guzzler First Week Joined in the very first week of SmileBASIC Source Website Drawing I like to draw! Hobbies Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Okay. I might be using this for some practical applications... 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS The downloadable project folder has a secret... HTV04 HTV04 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength April Fool's 2017 Contest Participant I participated in the SmileBASIC Source April Fool's 2017 Contest! Programming Contest Forum Contributor Hidden Achievements What is it? SquareFingers SquareFingers I think the loop should begin FOR I=0TO, and I think the guard on the IF should be E=13. 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Oh, yeah I made a typo in the FOR statement. (fixed) The IF statement checks if E is NOT 13, IF E!=13 THEN (encrypt character) But to save space, I changed it to E-13, which equals 0 only if E is 13, and uses 1 less character. incvoid incvoid lets hope they dont' change the rnd function anytime soon, or else the returned seed could be different next update 12Me21 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS I doubt that will happen. MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies The RND function is a constant? SquareFingers SquareFingers No: but with a fixed seed, it is repeatable.