I want to write an little app that automatically encrypt a file
when when needed automatically decrypt and read content.
i have searched some resources, some examples codes show that encryption key is randomly generated such as DES or AES methods,
my question is if this key is generated randomly, then next time when decrypting, the key generated will be different from the key used for encryption. which means the encrypted file cannot be decrypted anymore.
am I right about this?
if im correct, then what is the way to encrypt and decrypt a txt file without using a known password??