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, 2022 in Node-js by Vaani
• 7,070 points
531 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
0 answers

npm command not working after installing nodejs in windows10?

i have installed nodejs from nodejs website. ...READ MORE

Aug 11, 2022 in Node-js by Neha
• 9,020 points
1,576 views
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,840 points
11,046 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,840 points
3,451 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,840 points
6,606 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,840 points
6,336 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,840 points
672 views
0 votes
1 answer

Xcode not found in the PATH and expo cannot run iOS simulator

It sounds like you've encountered a few ...READ MORE

answered Feb 17, 2023 in AWS by sarit
• 1,830 points
907 views
0 votes
1 answer

sudo: npm: command not found

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

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
5,136 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
1,947 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP