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,020 points
322 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,060 points
1,203 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,880 points
10,684 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,880 points
3,018 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,880 points
6,047 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,880 points
5,719 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,880 points
408 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
474 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
4,611 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,696 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