Unix xxd -r -p command NodeJS equivalent

0 votes
I'm attempting to convert an encrypted shell script to a Nodejs version, and I'm having trouble with this one command:

"ENCRYT KEY = $(printf 'Random hex string>' ENCRYT KEY = $(printf 'Random hex string>' ENCRYT KEY

' | xxd -r -p | openssl rsautl -encrypt -pkcs -pubin -inkey "public-key.pem" | base64)'| xxd -r -p | openssl rsautl -encrypt -pkcs -pubin -inkey "public-key.pem""

The functionality of "xxd -r -p" could not be replicated in NodeJS.

Does anyone have any suggestions?
Jun 9 in Node-js by Vaani
• 7,020 points
21 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Node-js

0 votes
1 answer

How do I send command line arguments to npm script?

Hello @kartik, The syntax is as follows: npm run ...READ MORE

answered Jul 8, 2020 in Node-js by Niroj
• 82,720 points
9,186 views
0 votes
1 answer

How do I “include” functions from my other files in nodejs?

Hello @kartik, You require any js file,so you just ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,720 points
1,488 views
0 votes
1 answer

Error: listen EADDRINUSE while using nodejs?

Hello @kartik, EADDRINUSE means that the port number which listen() tries ...READ MORE

answered Jul 9, 2020 in Node-js by Niroj
• 82,720 points
2,003 views
0 votes
1 answer

Error:npm WARN unmet dependency in nodejs

Hii @kartik, Following are the possible solution : Manually ...READ MORE

answered Jul 12, 2020 in Node-js by Niroj
• 82,720 points
2,654 views
0 votes
1 answer

Node.js version on the command line?

Hello @kartik, The command line for that is: node ...READ MORE

answered Jul 13, 2020 in Node-js by Niroj
• 82,720 points
170 views
0 votes
1 answer

How nodejs get file name from absolute path?

Hello @kartik, Use the basename method of the path module: path.basename('/foo/bar/baz/asdf/quux.html') // returns 'quux.html' If you ...READ MORE

answered Jul 14, 2020 in Node-js by Niroj
• 82,720 points
2,461 views
0 votes
1 answer

sudo: npm: command not found

To answer your question, for me, the ...READ MORE

answered Feb 17 in Others by Aditya
• 7,280 points
463 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
970 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP