converting openssl hex dump or PEM format to integer array

Hello. I'm working on a project that involves creating public/private keys server-side using openssl and using the public key in a Javascript application to encrypt sensitive data in form fields before transmission to the server. Using an SSL https server connection was not an option in this project, thus the need for Javascript encryption of the data.

I've worked with openssl server-side for some time but am new to the idea of trying to use RSA functions in Javascript. I've found a couple good implementions of RSA in Javascript, but each of them calls for an array of integers as the public key (or modulo/modulus). For example:

rsaEncode(PublicExponent e, Public Modulo (p*q), message);

With an example as:

rsaEncode([17],[146319787,207083639,101933441,168947106,49991],f.message.value);

How can I convert the output from the openssl CLI into an array of integers? I thought about writing a program to go through the hex dump of the openssl CLI output, computing the decimal equivalent, but I'm not sure how to arrive at an array of integers that is needed in this JS call?

I'm hoping this is a trivial issue and I'll soon be laughing about all the time I wasted trying to figure out why I can't get openssl to output the mystical "array of integers" format. Thank you for your help.

No takers on this, it seems. I started to work on the code that would convert it, but finally ended up finding a Javascript implementation of RSA that would accept the hexidecimal key. So, I'm set.