I have a text file for which I use two write functions: 1) Normal Write, 2) Secure Write.
Now when I want to read the data from the file, I should be only be able to read the data written using the "Normal Write" function and should not be able to read the data written using "Secure Write" function.
My idea was to use a dictionary for this using the key as a flag to check if the value was written using normal write or secure write.
How can I do this in Python?
its all a matter of how secure you want your data. the best solution is to use encryption, or multiple files, or both.
if you simply want a flag that your program can use to tell if data in a file is normal or secure, there are a few ways you can do it.
here is a way i would implement it using the first option.
this should work. but its not the best way to secure your data.