Skip to content

Save the user's possible subdirectories encrypted in a file. #4

@SA-10125

Description

@SA-10125

Overview

For each user, when signing up, make another file containing a list of subdirs taken. i.e

char subdirs[100][256];
int num_subdirs = get_subdirectories("storage", subdirs, 100); //gets (up to) 100 subdirs from storage.

Now we take this list of subdirs and (take just the characters in an encryptable way)
Then we encrypt and keep the packets just like with contents, key, etc. (encrypt as you encrypt content)
Then we get these back when reading and use them to get subdirs. That way, someone creating a new folder in storage won't break the encryption for all the files. (cause currently, it relies on order)

This file must be decrypted and used to get the directories instead of checking which directories are in the folder each time.
If directories are checked each time,
Say someone encrypts some files.
Then adds new directories in storage
Now, if they try to decrypt, it may not work since the subdirectories and their order may be different.

Hence, we want to store a file/files containing the subdirectories at the moment of encryption, which can then be used to get subdirectories for decrypting directly, since the order and subdirectories in the encrypted subdirs file will be the same as it was at encryption. So even if the actual folder has more subdirs now, the subdirs we use to find and decrypt are the same as at the moment of encryption.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions