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?