forked from rachanon/stdbWeb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
59 lines
2.1 KiB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|
"http://www.w3.org/TR/html4/loose.dtd"> |
|
<html> |
|
<head> |
|
<title>QUnit for 'ecparam-1.0.js'</title> |
|
<script type="text/javascript" src="jquery-1.4.2.min.js"></script> |
|
<script type="text/javascript" src="qunit.js"></script> |
|
<link rel="stylesheet" href="qunit.css" type="text/css" media="screen" /> |
|
<!-- crypto-js, yahoo --> |
|
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/core.js"></script> |
|
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/sha256.js"></script> |
|
<script src="http://yui.yahooapis.com/2.9.0/build/yahoo/yahoo-min.js"></script> |
|
<!-- tom wo's --> |
|
<script src="../ext/jsbn.js"></script> |
|
<script src="../ext/jsbn2.js"></script> |
|
<script src="../ext/prng4.js"></script> |
|
<script src="../ext/rng.js"></script> |
|
<script src="../ext/ec.js"></script> |
|
<!-- bitcoin --> |
|
<script src="../ext/ec-patch.js"></script> |
|
<!-- kjur --> |
|
<script src="../asn1hex-1.1.js"></script> |
|
<script src="../asn1-1.0.js"></script> |
|
<script src="../crypto-1.1.js"></script> |
|
<script src="../ecdsa-modified-1.0.js"></script> |
|
<script src="../ecparam-1.0.js"></script> |
|
|
|
<script type="text/javascript"> |
|
$(document).ready(function(){ |
|
|
|
test("ECParameterDB NIST P-256", function() { |
|
var db = KJUR.crypto.ECParameterDB; |
|
expect(5); |
|
equal(typeof db.getByName("secp256r1"), "object", "secp256r1 defined"); |
|
equal(typeof db.getByName("NIST P-256"), "object", "alias NIST P-256 defined"); |
|
equal(typeof db.getByName("P-256"), "object", "alias P-256 defined"); |
|
equal(typeof db.getByName("prime256v1"), "object", "alias prime256v1 defined"); |
|
var ecparam = db.getByName("prime256v1"); |
|
equal(ecparam['n'].toString(16), "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", "prime256v1:n = "); |
|
}); |
|
|
|
}); |
|
</script> |
|
|
|
</head> |
|
<body> |
|
<div id="qunit"></div> |
|
<div id="qunit-fixture">test markup</div> |
|
|
|
<p> |
|
ECC related QUnit test pages: |
|
<a href="qunit-do-crypto.html">crypto.js</a> | |
|
<a href="qunit-do-crypto-ecdsa.html">crypto.js Signature class for ECDSA</a> | |
|
<a href="qunit-do-ecdsamod.html">ecdsa-modified.js</a> | |
|
<a href="qunit-do-ecparam.html">ecparam.js</a> | |
|
</p> |
|
|
|
</body> |
|
</html>
|
|
|