Wednesday 30 October 2019

N-API and Default Node Api methods

Hey everyone,I’m getting started with N-API to produce some native addons for my Electron apps, so apologies if this is very basic stuff.I’ve been able to write/build some simple examples to learn the basics, but how would one go about accessing the filesystem and doing crypto operations in the native c/c++ code? (Functionality that one might just utilise for “node licensing” and authentication)I had assumed that Node would allow me to import native headers for things like fs and crypto (similar to how I’d require() then in JS) but I can’t find any definitive answers or more advanced examples that cover this functionality in a way I can follow.I’ve seen some references to libsodium online for crypto but is it really necessary to be adding third party libraries for this?Thanks all, hope to hear from you soon 🙂

Submitted October 30, 2019 at 11:49PM by rs2845

No comments:

Post a Comment