- forge :
object
node-forge crypto engine
- createPrivateKey([size]) ⇒
Promise.<buffer>
Generate a private RSA key
- createPublicKey(key) ⇒
Promise.<buffer>
Generate a public RSA key
- getModulus(input) ⇒
Promise.<buffer>
Get modulus
- getPublicExponent(input) ⇒
Promise.<buffer>
Get public exponent
- readCsrDomains(csr) ⇒
Promise.<object>
Read domains from a Certificate Signing Request
- readCertificateInfo(cert) ⇒
Promise.<object>
Read information from a certificate
- createCsr(data, [key]) ⇒
Promise.<Array.<buffer>>
Create a Certificate Signing Request
node-forge crypto engine
Generate a private RSA key
Kind: global function
Returns: Promise.<buffer>
- Private RSA key
Param | Type | Default | Description |
---|---|---|---|
[size] | number |
2048 |
Size of the key, default: 2048 |
Generate a public RSA key
Kind: global function
Returns: Promise.<buffer>
- Public RSA key
Param | Type | Description |
---|---|---|
key | buffer | string |
PEM encoded private key |
Get modulus
Kind: global function
Returns: Promise.<buffer>
- Modulus
Param | Type | Description |
---|---|---|
input | buffer | string |
PEM encoded private key, certificate or CSR |
Get public exponent
Kind: global function
Returns: Promise.<buffer>
- Exponent
Param | Type | Description |
---|---|---|
input | buffer | string |
PEM encoded private key, certificate or CSR |
Read domains from a Certificate Signing Request
Kind: global function
Returns: Promise.<object>
- {commonName, altNames}
Param | Type | Description |
---|---|---|
csr | buffer | string |
PEM encoded Certificate Signing Request |
Read information from a certificate
Kind: global function
Returns: Promise.<object>
- Certificate info
Param | Type | Description |
---|---|---|
cert | buffer | string |
PEM encoded certificate |
Create a Certificate Signing Request
Kind: global function
Returns: Promise.<Array.<buffer>>
- [privateKey, certificateSigningRequest]
Param | Type | Description |
---|---|---|
data | object |
|
[data.keySize] | number |
Size of newly created private key, default: 2048 |
[data.commonName] | string |
|
[data.altNames] | array |
default: [] |
[data.country] | string |
|
[data.state] | string |
|
[data.locality] | string |
|
[data.organization] | string |
|
[data.organizationUnit] | string |
|
[data.emailAddress] | string |
|
[key] | buffer | string |
CSR private key |