Question: STEGANOGRAPHY IN BITMAPS CODE IN C PLEASE THE encode function. The encode function needs to: 1. Open the bitmap and message files (use read_file and

STEGANOGRAPHY IN BITMAPS

CODE IN C PLEASE THE encode function. STEGANOGRAPHY IN BITMAPS CODE IN C PLEASE THE encode function. The encode

The encode function needs to: 1. Open the bitmap and message files (use read_file and read_bmp) 2. Encode the size of the message into the image part of the bitmap 3. Encode the message into the bitmap 4. Write the encoded bitmap file (using write_bmp) 5. Close output file and free the memory in the Bitmap struct for the file The first task in encoding a bitmap is to use the first 32 bytes in the bitmap to contain an unsigned integer containing the length of the message so you know how many characters you need to decode later to retrieve the message. I have provided this code for free below. //Write message length in first 32 chars of bmp for (bmp_cnt-HEADER_SIZE; bmp_cnt HEADER_SIZE+32; bmp_cnt++) //Flip LSB based on a bit in message size if (msg_size_2 &INTMIN) I/ msg_size_2 is message size m.data [bmp_cnt] 1l //Flip LSB to 1 else //m is a Bitmap struct and data file data m.data [bmpcnt] 254; //Flip LSB to 0 - msg_size 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!