# Global

##

### Methods

#### DER2PEM(pathIN, pathOUT, typeopt, callback)

Source:
  - convert.js, line 64

conversion from DER to PEM format

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`pathIN` | String |  | path of the DER encoded certificate file
`pathOUT` | String |  | path of the PEM encoded certificate file to generate
`type` | String | <optional> | type of file, use 'rsa' for key file, 'x509' otherwise or leave this parameter out
`callback` | function |  | callback method called with error, boolean result

#### P7B2PEM(pathIN, pathOUT, callback)

Source:
  - convert.js, line 126

conversion from P7B to PEM format

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathIN` | String | path of the P7B encoded certificate file
`pathOUT` | String | path of the PEM encoded certificate file to generate
`callback` | function | callback method called with error, boolean result

#### P7B2PFX(pathBundleIN, pathOUT, password, callback)

Source:
  - convert.js, line 228

conversion from P7B to PFX/PKCS#12

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathBundleIN` | Object | paths of the PEM encoded certificate files ({cert: '...', key: '...', ca: '...' or ['...', ...]})
`pathOUT` | String | path of the PFX certificate file to generate
`password` | String | password to be set for the PFX file and to be used to access the key file
`callback` | function | callback method called with error, boolean result

#### PEM2P7B(pathBundleIN, pathOUT, callback)

Source:
  - convert.js, line 93

conversion from PEM to P7B format

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathBundleIN` | Object | paths of the PEM encoded certificate files ({cert: '...', ca: '...' or ['...', ...]})
`pathOUT` | String | path of the P7B encoded certificate file to generate
`callback` | function | callback method called with error, boolean result

#### PEM2PFX(pathBundleIN, pathOUT, password, callback)

Source:
  - convert.js, line 151

conversion from PEM to PFX

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathBundleIN` | Object | paths of the PEM encoded certificate files ({cert: '...', key: '...', ca: '...' or ['...', ...]})
`pathOUT` | String | path of the PFX encoded certificate file to generate
`password` | String | password to set for accessing the PFX file
`callback` | function | callback method called with error, boolean result

#### PFX2PEM(pathIN, pathOUT, password, callback)

Source:
  - convert.js, line 195

conversion from PFX to PEM

##### Parameters:

Name | Type | Description
--- | --- | ---
`pathIN` | Object | path of the PFX encoded certificate file
`pathOUT` | String | path of the PEM encoded certificate file to generate
`password` | String | password to set for accessing the PFX file
`callback` | function | callback method called with error, boolean result

### Type Definitions

#### errorCallback(err)

Source:
  - helper.js, line 135

Callback for return an error object.

##### Parameters:

Name | Type | Description
--- | --- | ---
`err` | Error | An Error Object or null