## Tests
-A few basic tests are availabe in the source repository under `test/`.
+A few basic tests are available in the source repository under `test/`.
- `index.html` is a web interface to test browser execution and compare
performance with other browser-based implementations.
const size = document.getElementById('size')
const api = document.getElementById('api')?.value
if (api === 'nano25519 with bulk block verification') {
- bytes.value = nano25519.constants.BLOCKHASH_BYTELENGTH
- bytes.disabled = true
- size.value = nano25519.constants.MAX_VERIFY_BLOCKS
- size.dataset.value = 1
- size.disabled = true
- } else {
+ if (!size.disabled) {
+ bytes.value = nano25519.constants.BLOCKHASH_BYTELENGTH
+ bytes.disabled = true
+ size.value = nano25519.constants.MAX_VERIFY_BLOCKS
+ size.dataset.value = 1
+ size.disabled = true
+ }
+ } else if (size.disabled) {
bytes.disabled = false
size.value = 100
size.dataset.value = 0
document.getElementById('btnStartTest').addEventListener('click', startTest)
</script>
<style>
- body{background:black;color:white;font-size:0.9rem;line-height:140%;margin:0 auto;max-width:900px;}a{color:darkcyan;}input[type=number]{width:5em;}input[type=checkbox]{margin-right:2em;}
- div.hex{display:inline-block;font-family:monospace;}
- div.hex::before{color:grey;content:'0x';display:inline-block;font-family:monospace;font-size:90%;left:0.5em;position:relative;width:0;}
- div.hex>input{font-family:monospace;padding-left:1.5em;}
- .warning::before{content:'⚠️';}
+ body {
+ background: black;
+ color: white;
+ font-size: 0.9rem;
+ line-height: 140%;
+ margin: 0 auto;
+ max-width: 900px;
+ }
+ a {
+ color: darkcyan;
+ }
+ input[type=number] {
+ width: 5em;
+ }
+ input[type=checkbox] {
+ margin-right: 2em;
+ }
+ div.hex {
+ display: inline-block;
+ font-family: monospace;
+ }
+ div.hex::before {
+ color: grey;
+ content: '0x';
+ display: inline-block;
+ font-family: monospace;
+ font-size: 90%;
+ left: 0.5em;
+ position: relative;
+ width: 0;
+ }
+ div.hex > input {
+ font-family: monospace;
+ padding-left: 1.5em;
+ }
+ .warning::before {
+ content: '⚠️';
+ }
</style>
</head>