close all
fill([0 15 15 0],[0 0 1 1],'y')
text(0,.5,' 11010101010101011011001100111011','fontsize',18)
axis equal off manual
hold on
title('   The PlainText ','fontsize',18)
pause
title('   The Key     ','fontsize',18)
fill(5+[0 4 4 0],[0 0 1 1]+3,'w')
text(5,3.5,' 01100101','fontsize',18,'color','m')
pause
title('  Sender Encryppts the PlainText ','fontsize',18)
fill([0 15 15 0],[0 0 1 1]-2,'c')
shg
h1 = fill([0 4 4 0],[0 0 1 1]-1,'w');
h2 = text(0,-.5,' 01100101','fontsize',18,'color','m');
text(0,-1.5,' 10110000','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(3.6+[0 4 4 0],[0 0 1 1]-1,'w');
h2 = text(3.6,-.5,' 01100101','fontsize',18,'color','m');
text(0,-1.5,' 1011000000110000','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(7.2+[0 4 4 0],[0 0 1 1]-1,'w');
h2 = text(7.2,-.5,' 01100101','fontsize',18,'color','m');
text(0,-1.5,' 101100000011000011010110','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(10.9+[0 4 4 0],[0 0 1 1]-1,'w');
h2 = text(10.9,-.5,' 01100101','fontsize',18,'color','m');
text(0,-1.5,' 10110000001100001101011001011110','fontsize',18)
pause
delete(h1)
delete(h2)
title('   Receiver Decrypts the CipherText   ','fontsize',18)
fill([0 15 15 0],[0 0 1 1]-4,[173 255 47]/255)
pause
h1 = fill([0 4 4 0],[0 0 1 1]-3,'w');
h2 = text(0,-2.5,' 01100101','fontsize',18,'color','m');
text(0,-3.5,' 11010101','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(3.6+[0 4 4 0],[0 0 1 1]-3,'w');
h2 = text(3.6,-2.5,' 01100101','fontsize',18,'color','m');
text(0,-3.5,' 1101010101010101','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(7.2+[0 4 4 0],[0 0 1 1]-3,'w');
h2 = text(7.2,-2.5,' 01100101','fontsize',18,'color','m');
text(0,-3.5,' 110101010101010110110011','fontsize',18)
pause
delete(h1)
delete(h2)
h1 = fill(10.9+[0 4 4 0],[0 0 1 1]-3,'w');
h2 = text(10.9,-2.5,' 01100101','fontsize',18,'color','m');
text(0,-3.5,' 11010101010101011011001100111011','fontsize',18)
pause
delete(h1,h2)
title('          PlainText Retrieved       ','fontsize',18)
