%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich %% http://www.iis.ee.ethz.ch/~sha3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function b = block(data) b = zeros(2, 4, 'uint8'); for i=1:2 for j=1:4 b(i,j) = hex2dec(data(2*(j+4*(i-1))-1:2*(j+4*(i-1)))); end end end