<?xml version = "1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">

<head>
	<title>NDN Request Example</title>
	
	<script type="text/javascript" src="../Helper.js"></script>

	<script type="text/javascript">
	
		function encode(){
			var contentname = new Name( Name.createNameArray(document.getElementById('contentname').value) );
			
			var content = document.getElementById('content').value;
			
			var signedInfo = new SignedInfo();
			signedInfo.setFields();
			//var signatureBits = generateSignatureBits(contentname,content,signedInfo);
			
			//witness is null
			var signature = new Signature();
			
			
			var co = new ContentObject(contentname,signedInfo,content,signature); 
			
			co.sign();
			
			
			var output = encodeToHexContentObject(co);
			
			document.getElementById('result').innerHTML = output;

		}
		
		function decode(){
			
			
			
			var input = document.getElementById('result').innerHTML;

			
			var co = decodeHexContentObject(input);
			
			if(LOG>3)console.log('CONTENT OBJECT DECODED');
			if(LOG>3)console.log(co);

			///////////////////////////////////////
			
			var output ="";
			
			if(co==-1)
				output+= "NO CONTENT FOUND"
			else if (co==-2)
				output+= "CONTENT NAME IS EMPTY"
			else{
				if(co.name!=null && co.name.components!=null){
					output+= "NAME: ";
					
					for(var i=0;i<co.name.components.length;i++){
						output+= "/"+ toString(co.name.components[i]);
					}
					output+= "<br />";
					output+= "<br />";
				}
	
				if(co.content !=null){
					output += "CONTENT(ASCII): "+ toString(co.content);
					
					output+= "<br />";
					output+= "<br />";
				}
				if(co.content !=null){
					output += "CONTENT(hex): "+ DataUtils.toHex(co.content);
					
					output+= "<br />";
					output+= "<br />";
				}
				if(co.signature !=null && co.signature.signature!=null){
					
					output += "SIGNATURE(hex): "+ DataUtils.toHex(co.signature.signature);
					
					output+= "<br />";
					output+= "<br />";
				}
				if(co.signedInfo !=null && co.signedInfo.publisher!=null && co.signedInfo.publisher.publisherPublicKeyDigest!=null){
					
					output += "Publisher Public Key Digest(hex): "+ DataUtils.toHex(co.signedInfo.publisher.publisherPublicKeyDigest);
					
					output+= "<br />";
					output+= "<br />";
				}
				if(co.signedInfo !=null && co.signedInfo.timestamp!=null){
					
					output += "TimeStamp(hex): "+ co.signedInfo.timestamp.date;
					
					output+= "<br />";
					output+= "<br />";
				}
				if(co.signedInfo!=null && co.signedInfo.locator!=null && co.signedInfo.locator.publicKey!=null){
					
					var publickey = rstr2b64(toString(co.signedInfo.locator.publicKey));
					var publickeyHex = DataUtils.toHex(co.signedInfo.locator.publicKey).toLowerCase();
					var publickeyString = toString(co.signedInfo.locator.publicKey);
					
					var signature = DataUtils.toHex(co.signature.signature).toLowerCase();
					
					
					var input = toString(co.rawSignatureData);
					 
					
					output += "DER Certificate: "+publickey ;
					
					output+= "<br />";
					output+= "<br />";
					
					
					
					if(LOG>2) console.log(" ContentName + SignedInfo + Content = "+input);
					if(LOG>2) console.log(" PublicKey = "+publickey );
					if(LOG>2) console.log(" PublicKeyHex = "+publickeyHex );
					if(LOG>2) console.log(" PublicKeyString = "+publickeyString );
					
					if(LOG>2) console.log(" Signature "+signature );
					if(LOG>2) console.log(" Signature NOW IS" );
					if(LOG>2) console.log(co.signature.signature);
					
					
					var x509 = new X509();
					
					x509.readCertPEM(publickey);
					
					
					//x509.readCertPEMWithoutRSAInit(publickey);

					var result = x509.subjectPublicKeyRSA.verifyString(input, signature);
					console.log('result is '+result);
					/*var rsakey = new RSAKey();
					
					var kp = publickeyHex.slice(56,314);
					
					output += "PUBLISHER KEY(hex): "+kp ;
					
					output+= "<br />";
					output+= "<br />";
					
					console.log('kp is '+kp);
					
					var exp = publickeyHex.slice(318,324);
					
					console.log('kp size is '+kp.length );
					output += "exponent: "+exp ;
					
					output+= "<br />";
					output+= "<br />";
					
					console.log('exp is '+exp);
					
					
					rsakey.setPublic(kp,exp);

				    var result = rsakey.verifyString(input, signature);*/
					
					if(result)
						output += 'SIGNATURE VALID';
					else
						output += 'SIGNATURE INVALID';

						
					
					
					//output += "VALID: "+ toHex(co.signedInfo.locator.publicKey);
					
					output+= "<br />";
					output+= "<br />";
					
					
					if(LOG>4) console.log('str'[1]);
				}
			}
			
			document.getElementById('result').innerHTML = output;
			
		}

	</script>

</head>
<body >
	<form>
		
		Please Enter a Content Name:<br />
		
		<input id="contentname" type="text" name="CONTENTNAME" value="/PARC/abc" /> 
		
		Please Enter the Content:<br />
		
		<textarea id="content" cols="40" rows="5" name="CONTENT" value="SUCCESS"  >SUCCESS!</textarea> 
		
	</form>
	<button onclick="encode()">Encode</button>
	<button onclick="decode()">Decode</button>
	
	

		<p id="result"></p>

</body>
</html>