{"id":19579758,"url":"https://github.com/wolfssl/wolfcrypt_nodejs","last_synced_at":"2025-07-27T20:34:17.531Z","repository":{"id":56868295,"uuid":"526732312","full_name":"wolfSSL/wolfcrypt_nodejs","owner":"wolfSSL","description":"wolfCrypt Node.JS support","archived":false,"fork":false,"pushed_at":"2024-11-18T18:25:11.000Z","size":120,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-04-27T08:36:33.850Z","etag":null,"topics":["ecc","encryption","evp","hmac","iot","napi","node-js","nodejs","pbkdf2","pkcs7","rsa","security","sha256","wolfcrypt","wolfssl"],"latest_commit_sha":null,"homepage":"https://www.wolfssl.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wolfSSL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-19T19:42:38.000Z","updated_at":"2024-11-18T18:25:15.000Z","dependencies_parsed_at":"2024-11-18T19:26:05.192Z","dependency_job_id":"339dfc30-b770-472f-95b4-81133a09a0ec","html_url":"https://github.com/wolfSSL/wolfcrypt_nodejs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wolfSSL/wolfcrypt_nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2Fwolfcrypt_nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2Fwolfcrypt_nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2Fwolfcrypt_nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2Fwolfcrypt_nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfSSL","download_url":"https://codeload.github.com/wolfSSL/wolfcrypt_nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfSSL%2Fwolfcrypt_nodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267419082,"owners_count":24084100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecc","encryption","evp","hmac","iot","napi","node-js","nodejs","pbkdf2","pkcs7","rsa","security","sha256","wolfcrypt","wolfssl"],"created_at":"2024-11-11T07:18:57.361Z","updated_at":"2025-07-27T20:34:17.488Z","avatar_url":"https://github.com/wolfSSL.png","language":"JavaScript","readme":"# wolfCrypt Node.JS support\n\n## Requirements\n\n[Node.js](https://nodejs.org/en/download/package-manager)\n\n\n[npx](https://docs.npmjs.com/cli/v8/commands/npx)\n\n\n## Description\n\nThis Node.js module exposes various wolfCrypt native C functions to Node.js using the Napi library. It makes wolfCrypt functions for ECC, EVP, HMAC, PBKDF2, PKCS7, RSA and SHA available within Nodejs and also provides interface classes that streamline a lot of the tedious actions required when using these functions.\n\n### Native C Functions\n\nThe native C functions can be called by importing wolfCrypt from this package:\n\n```\nconst { wolfcrypt } = require( 'wolfcrypt' )\nconst message = Buffer.from( 'Hello wolfSSL!' )\n\n// allocate the rsa key\nlet rsaKey = Buffer.alloc( wolfcrypt.sizeof_RsaKey() )\n// init the rsa key\nlet ret = wolfcrypt.wc_InitRsaKey( rsaKey )\n// make a new key\nif ( ret == 0 )\n  ret = wolfcrypt.wc_MakeRsaKey( rsaKey, 2048, 65537 )\n// sign a message\nlet signature = Buffer.alloc( wolfcrypt.wc_RsaEncryptSize( rsaKey ) )\nif ( ret == 0 )\n  ret = wolfcrypt.wc_RsaSSL_Sign( message, message.length, signature, signature.length, rsaKey )\n// check the signature\nif ( ret == signature.length )\n  ret = wolfcrypt.wc_RsaSSL_Verify( signature, signature.length, message, message.length, rsaKey )\n\nconsole.log( ret == message.length )\n\n// free the struct data\nret = wolfcrypt.wc_FreeRsaKey( rsaKey )\n```\n\n`ret` will be the return value of the C function. It is important to note that wolfcrypt structures are not managed by the garbage collector and as in the above example the relevant function call must be made to free the memory used by wolfCrypt, in this case `wc_FreeRsaKey`. All of the available C functions can be found in `addon/wolfcrypt/main.cpp`.\n\n### Interface Classes\n\nAlternatively if you find using the native C functions within Node.js to be clunky, interface Classes have been provided to make using wolfCrypt more convenient in Node.js:\n\n```\nconst { WolfSSLRsa } = require( 'wolfcrypt' )\nconst message = 'Hello wolfSSL!'\n\nlet rsa = new WolfSSLRsa()\n\ntry\n{\n  // make a new key\n  rsa.MakeRsaKey( 2048, 65537 )\n  // sign a message\n  const signature = rsa.SSL_Sign( message )\n  // check the signature\n  let valid = rsa.SSL_Verify( signature, message )\n\n  console.log( valid )\n\n  // free the struct data\n  rsa.free()\n}\ncatch ( e )\n{\n  console.log( e )\n}\n```\n\nInstead of needing to check the return value of the C functions, the class will do that for you and throw an error with the wolfSSL error code if anything fails. The free function must still be called to cleanup the internal structure data. The interface classes and their methods can be found in the interfaces folder.\n\n### Streams\n\nThe EVP and HMAC interfaces include stream classes that allow them to process data from stream buffers, which is convenient when working with files or http streams:\n\n```\nconst fs = require( 'fs' )\nconst { WolfSSLHmacStream } = require( 'wolfcrypt' )\n\nlet parts = []\nconst key = Buffer.from( '12345678901234567890123456789012' )\n// create a read stream from the file message.txt\nlet readStream = fs.createReadStream( 'message.txt' )\nlet hmacStream = new WolfSSLHmacStream( 'SHA3_512', key )\n\n// collect all the data that come from the hmac stream\nhmacStream.on( 'data', function( chunk ) {\n  parts.push( chunk )\n} )\n\n// called when the end of file has been hashed\nhmacStream.on( 'end', function() {\n  const fileDigest = Buffer.concat( parts ).toString( 'hex' )\n\n  console.log( fileDigest )\n} )\n\n// send the output of the file stream to the hmacStream\nreadStream.pipe( hmacStream )\n```\n\nIn the above example we take the contents of `message.txt` and compute the hmac using the provided key and `SHA3_512` as the hashing algorithm.\n\n### Async Support\n\nThe RSA and ECC key make functions support async workers and can be called using either a promise or a callback function:\n\n```\nconst { WolfSSLEcc } = require( 'wolfcrypt' );\n\n( async () =\u003e {\n  let ecc0 = new WolfSSLEcc()\n  let ecc1 = new WolfSSLEcc()\n\n  // make both keys concurrently\n  await Promise.all([ ecc0.make_key_promise( 64 ), ecc1.make_key_promise( 64 ) ])\n\n  const secret_0 = ecc0.shared_secret( ecc1 ).toString( 'hex' )\n  const secret_1 = ecc1.shared_secret( ecc0 ).toString( 'hex' )\n\n  ecc0.free()\n  ecc1.free()\n\n  console.log( secret_0 == secret_1 )\n} )()\n```\n\nThis example uses the `make_key_promise` to make both keys concurrently, but requires promises. The same example using callbacks would look like:\n\n```\nconst { WolfSSLEcc } = require( 'wolfcrypt' );\n\nlet ecc0 = new WolfSSLEcc()\nlet ecc1 = new WolfSSLEcc()\nlet readyKeys = 0;\n\nconst cb = ( err, ret ) =\u003e {\n  if ( err || ret != 0 )\n  {\n    console.log( 'Failed to make key' )\n  }\n  else\n  {\n    readyKeys++;\n\n    if ( readyKeys == 2 )\n    {\n      const secret_0 = ecc0.shared_secret( ecc1 ).toString( 'hex' )\n      const secret_1 = ecc1.shared_secret( ecc0 ).toString( 'hex' )\n\n      ecc0.free()\n      ecc1.free()\n\n      console.log( secret_0 == secret_1 )\n    }\n  }\n}\n\n// make both keys concurrently\necc0.make_key_cb( 64, cb )\necc1.make_key_cb( 64, cb )\n```\n\nMore examples of how to use the functions in this library can be found in the tests directory\n\n## Building wolfSSL\n\nWolfSSL must be installed on your machine, this package dynamically links it\n\n```\n./configure --enable-all\nmake\nsudo make install\n```\n\nTo link wolfCrypt you need to run `export LD_LIBRARY_PATH=/usr/local/lib` or wherever you have your wolfssl installed:\n\nVerify the .so (shared object) path and version in `binding.gyp`:\n\n```\n        'libraries': [\n          \"/usr/local/lib/libwolfssl.so\"\n        ],\n```\n\n## Package Installation\n\n### Install using npm\n\n```\nnpm i wolfcrypt\n```\n\nThen to import it in your application code\n\n```\nconst { wolfcrypt, WolfSSLEncryptionStream } = require( 'wolfcrypt' )\n...\n```\n\n### Install latest main without npm package\n\n```\ngit clone https://github.com/wolfSSL/wolfcrypt_nodejs\ncd wolfcrypt_nodejs\nnpm i\n```\n\nThen copy the directory into your project's `node_modules` folder\n\n```\ncp -R wolfcrypt_nodejs my_project/node_modules\n```\n\nAnd import it using the folder name\n\n```\nconst { wolfcrypt, WolfSSLEncryptionStream } = require( 'wolfcrypt_nodejs' )\n...\n```\n\n## Visual Studio\n\nUse the local [./lib/user_settings.h](./lib/user_settings.h); Copy it to your `\u003cWOLFSSL_ROOT\u003e/IDE/Win` directory (or wherever your wolfssl binaries will be).\nSee the `wolfssl-VS2022.vcxproj` Project File in the root of your wolfSSL source.\n\nThe [setup_env.ps1](./setup_env.ps1) or [setup_env.bat](./setup_env.bat) script can be used to setup the NodeJS/NPM environment.\n\n## wolfSSL Source Code\n\nThe Windows Visual Studio environment assumes that wolfSSL source code repository is available. If not:\n\nFrom DOS:\n\n```dos\ncd C:\\workspace\n\n:: Fetch this repo from your fork:\ngit clone https://github.com/%USERNAME%/wolfcrypt_nodejs.git\n\n:: Fetch wolfssl from your fork:\ngit clone https://github.com/%USERNAME%/wolfssl.git \"wolfssl-%USERNAME%\"\n\ncd \"wolfssl-%USERNAME%\"\ngit remote add upstream https://github.com/wolfSSL/wolfssl.git\n```\n\nFrom Powershell:\n\n``` Powershell\ncd C:\\workspace\n$USERNAME = $env:USERNAME\n\n# Fetch this repo from your fork:\ngit clone https://github.com/$USERNAME/wolfcrypt_nodejs.git\n\n# Fetch wolfssl from your fork:\ngit clone \"https://github.com/$USERNAME/wolfssl.git\" \"wolfssl-$USERNAME\"\n\ncd \"wolfssl-$USERNAME\"\ngit remote add upstream https://github.com/wolfSSL/wolfssl.git\n```\n\nScript preference will be given first for the directory name `wolfssl-\u003cusername\u003e`, then `wolfssl`\n\n### Environment Variable Settings\n\nFor the `binding.gyp`:\n\n* `WOLFSSL_LIB_PATH` location of the wolfSSL compiled lib file, default: `C:/workspace/wolfssl/DLL Release/x64`\n* `WOLFSSL_INCLUDE_PATH` location of wolfssl include directory, default: `C:/workspace/wolfssl`\n* `WOLFSSL_USER_SETTINGS_PATH` location of wolfssl `user_settings.h` default: `C:/workspace/wolfssl/IDE/WIN`\n\nImportant: Ensure the same `user_settings.h` used to compile wolfSSL is referenced from this NodeJS module!\n\nDOS\n\n```dos\nset WOLFSSL_LIB_PATH=C:/workspace/wolfssl-%USERNAME%/DLL Release/x64\nset WOLFSSL_INCLUDE_PATH=C:/workspace/wolfssl-%USERNAME%\nset WOLFSSL_USER_SETTINGS_PATH=C:/workspace/wolfssl-%USERNAME%/IDE/WIN\n\nset PATH=%PATH%;%WOLFSSL_LIB_PATH%\n```\n\nPowerShell\n\n```ps\n$env:WOLFSSL_LIB_PATH = \"C:/workspace/wolfssl-$env:USERNAME/DLL Release/x64\"\n$env:WOLFSSL_INCLUDE_PATH = \"C:/workspace/wolfssl-$env:USERNAME\"\n$env:WOLFSSL_USER_SETTINGS_PATH = \"C:/workspace/wolfssl-$env:USERNAME/IDE/WIN\"\n\n$env:PATH += \";$env:WOLFSSL_LIB_PATH\"\n```\n\n## Visual Studio 2022\n\nSee:\n\n* [Tutorial: Node.js for Beginners](https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-nodejs?view=vs-2022)\n* [Tutorial: Create a Node.js and Express app in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-nodejs?view=vs-2022)\n\n```powershell\nwinget install Schniz.fnm\n```\n\nEnsure the architecture compiled in Visual Studio matches that in `node`: see `node -p \"process.arch\"`\n\n```powershell\nfnm env --use-on-cd | Out-String | Invoke-Expression\nfnm use --install-if-missing 20\nnode -v # should print `v20.18.0`\nnpx -v # should print `10.8.2`\n\n# Launch VS2022 from the same shell:\n\u0026 \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe\"\n```\n\nUse the [IDE/WIN10/user_settings.h](https://github.com/wolfSSL/wolfssl/blob/master/IDE/WIN10/user_settings.h) file and\nensure these items are defined:\n\n```c\n/* npm */\n#define NPM_WOLFCRYPT\n#ifdef NPM_WOLFCRYPT\n    #undef  HAVE_PKCS7\n    #define HAVE_PKCS7\n    #define HAVE_AES_KEYWRAP\n    #define WOLFSSL_AES_DIRECT\n    #define HAVE_X963_KDF\n    #define WOLFSSL_SHA224\n    #define WOLFSSL_KEY_GEN\n    #define HAVE_ECC\n    #define ECC_MAX_BITS 521\n    #define WC_ECC256\n    #define WC_ECC384\n    #define WC_ECC521\n    #define HAVE_ECC_ENCRYPT\n    #define WOLFSSL_UINT128_T_DEFINED\n    /* #define WC_RNG_SEED_CB */\n#endif\n```\n\nThere's also a reference file included in the [./lib](./lib) directory [here](./lib/user_settings.h).\n\nSee [wolfssl PR #8090](https://github.com/wolfSSL/wolfssl/pull/8090) that adds Visual Studio 2022 project files.\n\nBuild wolfssl using Visual Studio and see the resulting files as noted in output:\n\n```\n1\u003e   Creating library C:\\workspace\\wolfssl-gojimmypi-win\\DLL Release\\x64\\wolfssl-VS2022.lib and object C:\\workspace\\wolfssl-gojimmypi-win\\DLL Release\\x64\\wolfssl-VS2022.exp\n1\u003eGenerating code\n1\u003e0 of 3869 functions ( 0.0%) were compiled, the rest were copied from previous compilation.\n1\u003e  0 functions were new in current compilation\n1\u003e  0 functions had inline decision re-evaluated but remain unchanged\n1\u003eFinished generating code\n1\u003ewolfssl-VS2022.vcxproj -\u003e C:\\workspace\\wolfssl-gojimmypi-win\\DLL Release\\x64\\wolfssl-VS2022.dll\n========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========\n========== Build completed at 3:32 PM and took 12.825 seconds ==========\n```\n\nIn the above case, using the [root level project `wolfssl-VS2022.vcxproj`](https://github.com/wolfSSL/wolfssl/blob/master/wolfssl-VS2022.vcxproj),\nselect \"DLL Release\" build option; upon building the output binaries files should be found in\n`C:\\workspace\\wolfssl-%USERNAME%\\DLL Release\\x64\\wolfssl-VS2022.lib`.\n\nIt is best to convert the Windows `\\` to `/`.\n\nIf instead conpiled with the `wolfcrypt/test` app, the lib file will be in:\n\n`C:/workspace/wolfssl-%USERNAME%/wolfcrypt/test/DLL Release/x64/wolfssl-VS2022.lib`\n\nif this ` error C2065: 'TI': undeclared identifier` is encountered, ensure the `user_settings.h` mentioned above is used,\nin particular the `#define WOLFSSL_UINT128_T_DEFINED`.\n\n```\n  nothing.vcxproj -\u003e C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\Release\\\\nothing.lib\n  main.cpp\nC:\\workspace\\wolfssl-gojimmypi-win\\wolfssl\\wolfcrypt\\sp_int.h(257,44): error C2146: syntax error: missing ';' before identifier '__attribute__' [C:\\workspace\\wolfcrypt_\nnodejs-gojimmypi\\build\\wolfcrypt.vcxproj]\n  (compiling source file '../addon/wolfcrypt/main.cpp')\n\nC:\\workspace\\wolfssl-gojimmypi-win\\wolfssl\\wolfcrypt\\sp_int.h(257,65): error C2065: 'TI': undeclared identifier [C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\wolfcrypt\n.vcxproj]\n  (compiling source file '../addon/wolfcrypt/main.cpp')\n```\n\n\nIf this error is observed (missing `wolfssl/options.h`), see [wolfSSL install](https://github.com/wolfSSL/wolfssl/blob/master/INSTALL).\nDetermine if the `WOLFSSL_USER_SETTINGS` preprocessor directive has been defined.\n\n```text\ngyp info spawn args ]\n\n  nothing.c\n  win_delay_load_hook.cc\n  nothing.vcxproj -\u003e C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\Release\\\\nothing.lib\n  main.cpp\nC:\\workspace\\wolfcrypt_nodejs-gojimmypi\\addon\\wolfcrypt\\h\\evp.h(25,10): error C1083: Cannot open include file: 'wolfssl/options.h': No such file or directory [C\n:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\wolfcrypt.vcxproj]\n  (compiling source file '../addon/wolfcrypt/main.cpp')\n\ngyp ERR! build error\ngyp ERR! stack Error: `C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe` failed with exit code: 1\ngyp\n```\n\nIf this `Error: The specified module could not be found.` is observed:\n\n```text\nC:\\workspace\\wolfcrypt_nodejs-gojimmypi\u003enpm run test\n\n\u003e wolfcrypt@1.0.3 test\n\u003e node test.js\n\nnode:internal/modules/cjs/loader:1586\n  return process.dlopen(module, path.toNamespacedPath(filename));\n                 ^\n\nError: The specified module could not be found.\n\\\\?\\C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\Release\\wolfcrypt.node\n    at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)\n    at Module.load (node:internal/modules/cjs/loader:1288:32)\n    at Module._load (node:internal/modules/cjs/loader:1104:12)\n    at Module.require (node:internal/modules/cjs/loader:1311:19)\n    at require (node:internal/modules/helpers:179:18)\n    at Object.\u003canonymous\u003e (C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\interfaces\\ecc.js:21:19)\n    at Module._compile (node:internal/modules/cjs/loader:1469:14)\n    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)\n    at Module.load (node:internal/modules/cjs/loader:1288:32)\n    at Module._load (node:internal/modules/cjs/loader:1104:12) {\n  code: 'ERR_DLOPEN_FAILED'\n}\n\nNode.js v20.18.0\n```\n\nEnsure the DLL can be found, either copied locally or in the DOS path:\n\n```dos\n:: set your location of the wolfSSL root directory:\nset WOLFSSL_ROOT=C:\\workspace\\wolfssl-%USERNAME%\n\n:: if using the DLL Release from an example, such as the wolfcrypt test:\nset PATH=%PATH%;%WOLFSSL_ROOT%\\wolfcrypt\\test\\DLL Release\\x64\\\n\n:: otherwise set to root-level project; Be sure DLL Release was successfuly built and the file exists:\nset PATH=%PATH%;%WOLFSSL_ROOT%\\DLL Release\\x64\\\n```\n\nOr when using PowerShell:\n\n```ps\n# set WOLFSSL_ROOT to c:\\workspace\\wolfssl-[your login name]\n\n$env:WOLFSSL_ROOT = \"C:\\workspace\\wolfssl-$env:USERNAME\"\n$env:PATH += \";$env:WOLFSSL_ROOT\\DLL Release\\x64\"\n\n# Check the current path\n$env:PATH -split \";\"\n```\n\nWhen encountering `cannot open input file... wolfssl[-VS2022].lib` like this:\n\n```\nLINK : fatal error LNK1181: cannot open input file 'C:\\workspace\\wolfssl\\DLL Released\\wolfssl-VS2022.lib' [C:\\workspace\\wolfcrypt_nodejs\\build\\wolfcrypt.vcxproj]\n```\n\nEnsure the `DLL Release` build was selected and that the `[wolfssl root]\\DLL Release\\x64\\wolfssl-VS2022.lib` file exists; build with the wolfSSL project and confirm build was successful:\n\n```\n1\u003eFinished generating code\n1\u003ewolfssl-VS2022.vcxproj -\u003e C:\\workspace\\wolfssl\\DLL Release\\x64\\wolfssl-VS2022.dll\n========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========\n========== Rebuild completed at 6:08 PM and took 17.377 seconds ==========\n```\n\nFor the error: `LINK : fatal error LNK1181: cannot open input file '\u003cyour path\u003e\\DLL Release\\x64\\wolfssl.lib' ` like this:\n\n```\n  win_delay_load_hook.cc\nLINK : fatal error LNK1181: cannot open input file 'C:\\workspace\\wolfssl-gojimmypi\\DLL Release\\x64\\wolfssl.lib' [C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\build\\wolfcrypt.vcxproj]\ngyp ERR! build error\ngyp ERR! stack Error: `C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe` failed with exit code: 1\ngyp ERR! stack     at ChildProcess.onExit (C:\\workspace\\wolfcrypt_nodejs-gojimmypi\\node_modules\\node-gyp\\lib\\build.js:203:23)\ngyp ERR! stack     at ChildProcess.emit (node:events:519:28)\ngyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)\n```\n\nEnsure wolfSSL has been build with the `DLL Release` build option and that the files exist in `\u003cyour path\u003e\\DLL Release\\x64\\`.\n\n\nAlso ensure the `binding.gyp` file uses _forward slashes_, (or double backslashes). Not just a single backslash.\n\n```\n            ['OS==\"win\"', {\n                \"libraries\": [\n                    \"C:/workspace/wolfssl-gojimmypi-win/DLL Release/x64/wolfssl-VS2022.lib\",\n```\n\n### wolfSSL Configuration Notes\n\nNote that the `options.h` definition should match those from the compiled lib file that used the respective\nWindows [user_settings.h](https://github.com/gojimmypi/wolfssl/blob/master/IDE/WIN10/user_settings.h).\n\n\nClean build:\n\n```powershell\nnpm run clean\nnode-gyp clean\nnode-gyp rebuild\n```\n\nSee the `my_test.ps1` script that also includes:\n\n```\nnpm i\nnpm run test\n```\n\nRun it like this:\n\n```\npowershell -ExecutionPolicy Bypass -File .\\my_test.ps1\n```\n\n## Tests Output\n\n```\n$ npm run test\nPASS ecc makeKey\nPASS ecc sharedSecret32\nPASS ecc sharedSecret64\nPASS ecc signVerify\nPASS ecc importExportx963\nPASS ecc importExportDer\nPASS evp encrypt\nPASS evp decrypt\nPASS evp encrypt_decrypt_odd\nPASS evp encryptionStream\nPASS evp decryptionStream\nPASS evp encryptDecryptPipes\nPASS hmac hmac\nPASS hmac hmacStream\nPASS hmac hmacPipe\nPASS pbkdf2\nPASS pkcs7 addCertificate\nPASS pkcs7 encodeData\nPASS pkcs7 signVerify\nPASS pkcs7 getAttribute\nPASS pkcs7 getSid\nPASS rsa keyToDer\nPASS rsa keyToPublicDer\nPASS rsa privateKeyDecode\nPASS rsa publicKeyDecode\nPASS rsa encryptDecrypt\nPASS rsa signVerify\nPASS sha sha\nPASS sha sha224\nPASS sha sha256\nPASS sha sha384\nPASS sha sha512\nPASS sha sha512_224\nPASS sha sha512_256\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfssl%2Fwolfcrypt_nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfssl%2Fwolfcrypt_nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfssl%2Fwolfcrypt_nodejs/lists"}