Index.html
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 ">
<title>insert title here</title>
<script type= "Text/javascript" src= "Js/core-min.js" ></script>
<script type= "Text/javascript" src= "Js/aes.js" ></script>
<script type= "Text/javascript" src= "Common.js" ></script>
<script type= "Text/javascript" >
function Jia () {
var array=encrypt (document.getElementById ("old"). Value, "I am a private key that can be randomly generated!");
document.getElementById ("Key"). Value=array[0];
document.getElementById ("new"). Value=array[1];
}
function Jie () {
var old=decrypt (document.getElementById ("new"). Value,document.getelementbyid ("key"). Value);
document.getElementById ("div"). Value=unescape (old);
}
</script>
<body>
<form action= "" method= "POST" style= "margin:20px;padding:20px;" align= "Center" >
<input type= "text" value= "" id= "old"/>
<input type= "button" value= "Encrypted" onclick= "Jia ();" />
<input type= "text" value= "" id= "new"/>
<input type= "hidden" id= "key" >
<input type= "button" value= "Decrypt" onclick= "Jie ()"/>
<input type= "text" id= "div" value= "/>
</form>
</body>