18 December 2018 at 07:29 #125147
I am reading Cherrytree file format and wondering if anyone can help me to understand this as it is rather confusing.
1) The documentation say it uses 7-ZIP and “Both file types are compressed and password-protected with 7zip.” “Both file types” only means CTX and CTZ are compressed with the password. Is that correct?
2) Does the program use -p -mhe encryption in 7z?
3) When one loads a CTX and CTZ, the protected archive, cherrytree decrypts the encrypted archive to the temporary directory to operate and in the even of program crashes, abrupt termination, or machine crash, the unprotected data is left in the temporary directory.
During the usage of the archive (in unencrypted form) can other program access it, even in read-only mode or does Cherrytree ensure single user using it?
Question is: Is there a way to nominate where the temporary directory to Cherrytree?
4) When using CTB or CTD, does Cherrytree creates other files (temporary or otherwise)?
Jack18 December 2018 at 14:24 #125151
TMP_FOLDER = tempfile.mkdtemp()
Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory’s creation. The directory is readable, writable, and searchable only by the creating user ID.
The user of mkdtemp() is responsible for deleting the temporary directory and its contents when done with it.
The prefix, suffix, and dir arguments are the same as for mkstemp().
mkdtemp() returns the absolute pathname of the new directory.
CT saves the document in an encrypted 7zip archive. When viewing or editing the document, CT extracts the encrypted archive to a temporary folder, and works on the unencrypted copy. When closing, the unencrypted copy is deleted from the temporary directory. Note that in the case of application or system crash, the unencrypted document will remain in the temporary folder.
def file_write_low_level bash_str = '%s a -p%s -w%s -mx1 -bd -y %s %s' def file_get_cherrytree_data bash_str = '%s e -p%s -w%s -bd -y -o%s %s'
uncomment the debug statement in both methods and run CT from shell to see the output.
Hope this helps,
You must be logged in to reply to this topic.