필터 지우기
필터 지우기

How to split data from variable??

조회 수: 1 (최근 30일)
Kushal Khaitan
Kushal Khaitan 2013년 1월 19일
datahex = sprintf('%02x', data);
I have converted image into array named data and then converted into hexadecimal.
Now I want to apply AES algorithm on it. But at a time only 16 bytes are are required.
How to read 16 characters from this datahex then next 16 and so on until all have been read.
I have AES algorithm and want to read 16 bytes at a time and then next 16 bytes.
Plz help....thanx

채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 19일
for K = 1 : 32 : length(datahex)
datasubset = datahex(K : K + 31);
... work with datasubset ...
end
Note here that it takes 2 hex digits to form one byte.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by