www.pudn.com > zishiyingjiami.rar > HDU.m, change:2011-12-09,size:226b


function A1=HDU(A) 
[m,n]=size(A); 
A=double(A); 
%从下到上行加密 
for i=m:-1:1 
    for j=1:n 
        if i<m 
             A1(i,j)=bitxor(A(i,j),A1(i+1,j)); 
        else 
             A1(i,j)=A(i,j); 
      end 
   end 
end