NodeC
4 November 2021 12:01
1
There is a JavaScript function below: How do I import the javascript library into node red?
var key = encryptionKey();
var asn, tree;
rsa = new pidCrypt.RSA();
decodedKey = pidCryptUtil.decodeBase64(ekey);
asn = pidCrypt.ASN1.decode(pidCryptUtil.toByteArray(decodedKey));
tree = asn.toHexTree();
rsa.setPublicKeyFromASN(tree);
console.log= pidCryptUtil.encodeBase64(pidCryptUtil.convertFromHex(rsa.encrypt(passw += '|' + etime)));
As this is a question and you aren't actually sharing a project, it should be in the general category please. You will be much more likely to get a useful response then.
UnborN
4 November 2021 18:48
3
NodeC
5 November 2021 14:22
4
actually, it is a section of the code where I can't replace using node-red
NodeC
13 November 2021 12:12
5
Found some source code in npm.
How to convert them to Node in node red?
This is covered in the docs. You can use node.js modules in Node-RED in a few ways depending on what you are trying to do.
Load into global using settings.js
Load into a function node
Wrap the module in a custom node.
also note there are some more node.js type libraries that may help https://labs.ig.com/sample-apps
NodeC
14 November 2021 03:01
8
The aim is to use create some dashboards on node-red.
system
Closed
13 January 2022 03:02
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.