helper - Documentation

# helper

pem helper module

Source:
  - helper.js, line 9

### Members

#### (static) ciphers :Array

Source:
  - helper.js, line 59

list of supported ciphers

##### Type:

- Array

### Methods

#### (static) createPasswordFile(options, params, PasswordFileArray) → {Boolean}

Source:
  - helper.js, line 73

Creates a PasswordFile to hide the password form process infos via `ps auxf` etc.

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | object of cipher, password and passType, mustPass, {cipher:'aes128', password:'xxxx', passType:"in/out/word"}, if the object empty we do nothing ###### Properties
Name | Type | Description
--- | --- | ---
`cipher` | String | cipher like 'aes128', 'aes192', 'aes256', 'camellia128', 'camellia192', 'camellia256', 'des', 'des3', 'idea'
`password` | String | password can be empty or at last 4 to 1023 chars
`passType` | String | passType: can be in/out/word for passIN/passOUT/passWORD
`mustPass` | Boolean | mustPass is used when you need to set the pass like as "-password pass:" most needed when empty password
`params` | Object | params will be extended with the data that need for the openssl command. IS USED AS POINTER!
`PasswordFileArray` | String | PasswordFileArray is an array of filePaths that later need to deleted ,after the openssl command. IS USED AS POINTER!

##### Returns:

result

Type
  Boolean

#### (static) deleteTempFiles(files, callback)

Source:
  - helper.js, line 101

Deletes a file or an array of files

##### Parameters:

Name | Type | Description
--- | --- | ---
`files` | Array | array of files that shoudld be deleted
`callback` | errorCallback | Callback function with an error object

#### (static) isHex(hex)

Source:
  - helper.js, line 38

helper function to check is the string a hexaceximal value

##### Parameters:

Name | Type | Description
--- | --- | ---
`hex` | String | String that should be checked to be a hexaceximal

#### (static) isNumber(str)

Source:
  - helper.js, line 19

helper function to check is the string a number or not

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | String | String that should be checked to be a number

#### (static) toHex(str)

Source:
  - helper.js, line 46

helper function to convert a string to a hexaceximal value

##### Parameters:

Name | Type | Description
--- | --- | ---
`str` | String | String that should be converted to a hexaceximal