You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to xmldsig/js/src to play it yourself. The readme there should be enough guidance for you to run the JavaScript, providing many signed XML files (signed TokenScripts) and verify the signature of each.
(Optional) witness that xmldsig verification with JS works on commandline
Webpack (before version 5) suggested that they can package core modules with polyfills.
Create a webpack. There is the instruction in README but I already created one on my PC which you can use here, saving you the trouble of running webpack.
Since this webpack is created from index.js, it should contain the verify function (which is called from the said xmldsigverifier.js) but not the xmldsigverifier.js itself.
But it is a mystery how to call that verify() function theoretically included in main.js. I created one such HTML file:
Go to
xmldsig/js/src
to play it yourself. The readme there should be enough guidance for you to run the JavaScript, providing many signed XML files (signed TokenScripts) and verify the signature of each.Now the problem is how to make iOS/Android run this code. Android is secondary because it already can verify XMLDSIG.
How to take working node.js code to iOS is unknown to me. One thing for sure, the node.js code, in this case 16 lines https://github.com/TokenScript/TokenScript/blob/main/xmldsig/js/src/index.js is not pure JavaScript code that can run everywhere without treatment, because
Use webpack?
Webpack (before version 5) suggested that they can package core modules with polyfills.
Create a webpack. There is the instruction in README but I already created one on my PC which you can use here, saving you the trouble of running
webpack
.main.js.gz
Since this webpack is created from
index.js
, it should contain theverify
function (which is called from the saidxmldsigverifier.js
) but not thexmldsigverifier.js
itself.But it is a mystery how to call that verify() function theoretically included in main.js. I created one such HTML file:
I was expecting verify() to fail but I got "verify()" undefined.
Since webpack is created for web developers, there should be a way to call a function packed in a webpack?
The text was updated successfully, but these errors were encountered: