Function
Static Public Summary | ||
public |
Creates an encrypted payload from the sender, to the receiver. |
|
public |
open(receiver: Contact | ContactPromise, data: *): * Opens an encrypted payload |
Static Public
public exchange(sender: Contact, receiver: Contact, msg: *): * source
import {exchange} from 'discretecrypt.js/src/discretecrypt.js'
Creates an encrypted payload from the sender, to the receiver.
This code assumes both individuals are using the same parameters.
Return:
* |
TODO:
- consider adding advanced options, like allowing the embedding of tuned scrypt parameters on the exchange key. The scrypt step is important for keysize derivation, and creates uniqueness between message exchanges, but the speed is not as important in this step.
public open(receiver: Contact | ContactPromise, data: *): * source
import {open} from 'discretecrypt.js/src/discretecrypt.js'
Opens an encrypted payload
Params:
Name | Type | Attribute | Description |
receiver | Contact | ContactPromise | ||
data | * |
Return:
* |