JSDoc: Namespace: otr

# Namespace: otr

## jsxc. otr

Source:
  - jsxc.lib.otr.js, line 1

### Members

#### <static> objects

  list of otr objects
  Source:
    - jsxc.lib.otr.js, line 6

### Methods

#### <static> _createDSA()

  Ending of createDSA().
  Source:
    - jsxc.lib.otr.js, line 500

#### <static> backup(bid)

  Backups otr session

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | string |

  Source:
    - jsxc.lib.otr.js, line 349

#### <static> create(bid) → {undefined}

  Create new otr instance

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | type |

  Source:
    - jsxc.lib.otr.js, line 68

  ##### Returns:

  Type
    undefined

#### <static> createDSA() → {unresolved}

  Create or load DSA key
  Source:
    - jsxc.lib.otr.js, line 416

  ##### Returns:

  Type
    unresolved

#### <static> DSAready(dsa)

  Ending of DSA key generation.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `dsa` | DSA | DSA object

  Source:
    - jsxc.lib.otr.js, line 514

#### <static> goEncrypt(bid) → {undefined}

  Send request to encrypt the session

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | type |

  Source:
    - jsxc.lib.otr.js, line 314

  ##### Returns:

  Type
    undefined

#### <static> goPlain(bid, cb) → {undefined}

  Abort encryptet session

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | type |
  `cb` |  | callback

  Source:
    - jsxc.lib.otr.js, line 331

  ##### Returns:

  Type
    undefined

#### <static> onSmpQuestion(bid, data) → {undefined}

  show verification dialog with related part (secret or question)

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `bid` | type |  |
  `data` | string | <optional> |

  Source:
    - jsxc.lib.otr.js, line 251

  ##### Returns:

  Type
    undefined

#### <static> receiveMessage(d)

  Handler for otr receive event

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `d` | Object | ###### Properties
  Name | Type | Description
  --- | --- | ---
  `bid` | string |
  `msg` | string | received message
  `encrypted` | boolean | True, if msg was encrypted.
  `forwarded` | boolean |
  `stamp` | string | timestamp

  Source:
    - jsxc.lib.otr.js, line 20

#### <static> restore(bid)

  Restore old otr session

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | string |

  Source:
    - jsxc.lib.otr.js, line 381

#### <static> sendMessage(jid, msg)

  Handler for otr send event

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `jid` | string |
  `msg` | string | message to be send

  Source:
    - jsxc.lib.otr.js, line 54

#### <static> sendSmpReq(bid, sec, quest) → {undefined}

  Send verification request to buddy

  ##### Parameters:

  Name | Type | Argument | Description
  --- | --- | --- | ---
  `bid` | string |  |
  `sec` | string |  | secret
  `quest` | string | <optional> | question

  Source:
    - jsxc.lib.otr.js, line 284

  ##### Returns:

  Type
    undefined

#### <static> toggleTransfer(bid) → {undefined}

  Toggle encryption state

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bid` | type |

  Source:
    - jsxc.lib.otr.js, line 296

  ##### Returns:

  Type
    undefined