I want to design an application that reads some a folder of text files and shows the user its contents. Three problems arise: I need the folder containing the text files to be encrypted which I don't know how to do, two, I need a way to read the encrypted files without revealing the key in the python code, so I guess C would be the best way to do that even if I don't like that way(any suggestions are welcome,using python if possible), and three, I need a way to add files to the folder and then send the encrypted folder along with the program.
Is there any way to do those things without ever revealing the key or giving the user the possibility to read the folder except using my program?
Thanks in advance for any help!
**EDIT:** Also, is there a way to use C to encrypt and decrypt files so that I can put the key in the compiled file and distribute that with my program? If you are trying to prevent your users from reading the files you plan on giving them, just give up now; if the program is worth useing, someone will break any obscurity you try to add. (If you aren't, then sorry for the mini-rant; the first and/or last thirds of @schmatz's answer are probably the best solution.)
以上就是How to use python to read an encrypted folder的详细内容，更多请关注web前端其它相关文章！