mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-28 02:09:08 +00:00
.. | ||
build/src | ||
node_modules | ||
CHANGELOG.md | ||
LICENSE | ||
package.json | ||
README.md |
google-p12-pem
Convert your Google .p12
keys to .pem
keys.
Installation
npm install google-p12-pem
Usage
async/await style
const {getPem} = require('google-p12-pem');
async function foo() {
const pem = await getPem('/path/to/key.p12');
console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
}
promise style
const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12')
.then(pem => {
console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
})
.catch(err => {
console.error(err); // :(
});
callback style
const {getPem} = require('google-p12-pem');
getPem('/path/to/key.p12', function(err, pem) {
console.log(pem); // '-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAK...'
});
CLI style
gp12-pem myfile.p12 > output.pem