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 522

#### (static) backup(bid)

Backups otr session

##### Parameters:

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

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

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

Create new otr instance

##### Parameters:

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

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

##### Returns:

Type
  undefined

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

Create or load DSA key

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

##### 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 536

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

Send request to encrypt the session

##### Parameters:

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

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

##### 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 335

##### Returns:

Type
  undefined

#### (static) onSmpQuestion(bid, dataopt) → {undefined}

show verification dialog with related part (secret or question)

##### Parameters:

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

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

##### 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 385

#### (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 56

#### (static) sendSmpReq(bid, sec, questopt) → {undefined}

Send verification request to buddy

##### Parameters:

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

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

##### Returns:

Type
  undefined

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

Toggle encryption state

##### Parameters:

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

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

##### Returns:

Type
  undefined