how convert image into encrypted form?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
image processing
0 Kommentare
Akzeptierte Antwort
Jan
am 6 Mär. 2013
% Read the file:
FID = fopen('FileName.jpg');
if FID == -1, error('Cannot open file for reading.'); end
data = fread(FID, inf, 'uint8');
fclose(FID);
% Encrypt the byte stream:
data = rem(data, (1:length(data)-1) * 13, 256);
% Write the byte stream:
FID = fopen('FileName.enc', 'w');
if FID == -1, error('Cannot open file for writing.'); end
fwrite(FID, data, 'uint8');
fclose(FID);
If you want some stronger encryption, please explain this explicitly. We do not discuss about really strong encryptions in this forum for legal reasons, which I do not accept as serious and useful, but respecting existing laws is a good point to start from.
Searching in the net will help you exhaustively. So do not hesitate to try this before you ask the forum.
0 Kommentare
Weitere Antworten (1)
Walter Roberson
am 6 Mär. 2013
This was already answered for you. http://www.mathworks.co.uk/matlabcentral/answers/65891-what-was-the-source-code-for-image-encryption-and-decryption
0 Kommentare
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!