- you could just stop transferring and leave the larger array to be whatever is appropriate
- you could prefix size information into what is being transferred, so that the destination first retrieves the site and then knows how many locations to look at
- you could pad with a constant
- you could ensure that the data being transferred never includes a particular pattern, and then put the pattern at the place the data stops -- an "end of message" marker
LSB transform for image encryption
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to use LSB transform to encode the message in the image. The length of the bit string is less than the size of the image. I wrote a code, but when the length of the message is less, I don't know how to do the encryption. Thank you for your guidance
clc;
clear;
close all;
img=imread('cameraman.tif');
[m,n]=size(img);
message=randi([0 1],m,n);
em=img;
for i=1:m
for j=1:n
pix=dec2bin(img(i,j),8);
if (message(i,j)==0);
pix(8)='0';
else
pix(8)='1';
end
em(i,j)=bin2dec(pix);
end
end
0 Commenti
Risposte (2)
Walter Roberson
il 21 Gen 2023
For legal reasons we cannot discuss encryption here.
If you have two arrays and information is being transferred from a shorter array to a larger array, you have a few choices:
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!