The following is an example of how to encrypt a file:
First, let's talk about the concept: the extension name of the general system identification file, such as .txt. MP4. But in fact, most of the time the system recognizes files through the file header (this is the case in Linux )~~
You can give it a try on the above concepts:
You have a video file named xxx.mp4. I changed the file name to XXX. mmmm can be right-clicked by the system (under Win) and cannot be opened, but you can still open it: Find a player from the installed program (for example, thunder) you can open the file (there will be a prompt), which indicates that the file content has nothing to do with the file name, nonsense, right? Let's take a look at the key points below.
The file content is divided into the header and body
Encrypt the file header so that others cannot view the file, but they can:
Find an editor, such as ue, notepad+, and open xxx.mp4. You will see a lot of codes that you don't understand. It doesn't matter. You know that the first few are file headers, and the latter is the file content. encode the header (change to a non-null letter, for example, a-Z, A-Z) change for example AA into BB so the header is damaged, this file will be destroyed, who can not see it, but you remember how you changed it. When you want to read this file, you are changing it back and the file will be ready again.
Encrypts the file body to partially damage the file
The player can still play the video), but it breaks down when playing the video in half. You just need to change it back based on the original encoding. Remember how you changed it before, or whether the file is actually damaged ~~