I saw a C++ video about hiding files in a BMP bitmap. With PHP, which is the best language in the world, you should be able to do this.

Of course there is no practical effect, just look at it. So begin to do a ~~~ is the use of BMP bitmap in color channel, every four bytes there is a byte is useless, so you can put the source file Base64 and then a single split stored in the picture, and then generate a BMP bitmap, the surface does not see any changes. If the size is not larger than 1/4 of the source file, it will not change:

For example, if the bitmap is 5M and the files to be encrypted are 1M, the bitmap is still 5M and the files to be encrypted have been saved to the bitmap

At first, you can encrypt the file, but decrypt it with a lot of useless strings. Later, when encrypting files, two flags were added, one for filename length, stored in four bytes, and one for file data length. It’s stored in eight bytes. This ensures that the exact size of the data block can be read. Core code:

file



Demo address



Making the address


!!!!!!!!! Demo address, do not need to upload BMP can also, because MY server built a 2.47m BMP, :smiley:, as long as you will return a BMP picture after encryption, and then click the decryption button to select the BMP bitmap after encryption can get the source file