📜 ⬆️ ⬇️

NW.js (Node-Webkit) + Rutoken = RutokenJS (Start)

I decided to create a module ( C / C ++ Addons ) for NW.js to work with Rutoken and share the code with the community, and also invite you to participate in this Open source project.

The idea is that you can use all the features of Rutoken in the NW application using pure and clear JavaScript, and this module can also be used in Node.JS or io.js.

API RutokenJS

')
Usage example:

var rutoken = require('./rutoken/rutoken'); var cntSlot = rutoken.countSlot(); console.log('cntSlot: ', cntSlot); if(cntSlot > 0) { for(var i=0; i <= cntSlot-1; i++) { rutoken.getSlotInfo(i, function(data) { console.log('Slot info #' + i + "\n", data); }); rutoken.getTokenInfo(i, function(data) { console.log('Token info #' + i + "\n", data); }); rutoken.getMechanismList(i, function(data) { console.log('Mechanism list #' + i + "\n", data); }); } } 


GitHub project: https://github.com/roman-sopov/RutokenJS

Node addon examples: https://github.com/nodejs/node-addon-examples
Node addon documentation: https://nodejs.org/api/addons.html
Documentation Rutoken SDK: http://developer.rutoken.ru/pages/viewpage.action?pageId=3178534

Source: https://habr.com/ru/post/265575/


All Articles