This is going to be the biggest devlog. And this one’s gonna be a disappointing one 🥲
First of all, I was talking to my brother and he asked such a good question - It pointed to a flaw which I didn’t notice at all.
Let’s say there’s a word “am” in the journal, a’s cover is 1 and m’s cover is 27 (so am = 127). Now cuz there’s not spacing the decryption code will actually traverse thru each of number at a time in the encrypted text (127), so it’ll literally convert 1 and then 2 and then 7 separately. This was such a major flaw in my logic and I’m still agonizing internally over “How da the hell did it snoop my mind”.
But ah it’s ok, I’m fixing that by simply making adding spaces after number to separate each letter’s cover.
Another thing I noticed is that in Advanced encryption when the user will choose a cover for 52 letters, he might accidentally repeat a cover - which obvi will make it impossible to distinguish btw 2 letters. So I gotta add each cover to a list and then every time the user adds a cover I’ll see if it’s already there in the list or not.
Now these flaws I got to know when I was talking to my brother, and it was past midnight. So almost immediately after waking up I was onto fixing these flaws, and it’s in progress :)
Now in these after my last Devlogg, I organized and refined my code (Found some silly errors in functions), like earlier the Encryption Key that I was using to decrypted, it was a dictionary - with the keys as letters and values as the cover. So before uploading then to the db table, I converted them into text. But then while fixing decryption code, I did dict(thestringkey) and later found out that it doesn’t work like that. I checked online, asked gpt, he said that it’s not easy to convert text to dict and that I must use the json module, and so I did. So that made it pretty easy, now the conversion was smooth. Also I fixed all the login/signup system, it works as smooth as butter now. I’d say the main issue wasn’t the code it was following where am I, like cuz there are so many functions and steps and paths that I was getting overwhelmed (plus the code is like 600 lines), so I basically carefully went thru each line of code and arranged each function in an order and side by side made the final flowchart (It made things super easy and looks cool tbh)
Now after all this does the code run? No, there are 21 errors 😭 Plus, Swiption’s still left. So right now, I’m trying to fix the flaws and errors and get this code up and running without Swiption, once it is smooth then at the end I can code Swiption into it. See ya in the next devlog!
Thank you so much for reading :)