%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%% http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function words=towords(str,len)
for i=1:len/64
for j=8:-1:1
tmp=str(16*(i-1)+2*j-1:16*(i-1)+2*j);
if j==8
newstr=tmp;
else
newstr=cat(2,newstr,tmp);
end
end
if i==1
words=newstr;
else
words=cat(2,words,newstr);
end
end