Gun-Vue docs v0.21.4 • Docs
Gun-Vue docs v0.21.4 / Crypto / decFrom
Function: decFrom()
decFrom(
data
,sender
,receiver
):Promise
<string
>
Decrypts a private message from an entity.
- Generates secret using sender's
epub
and receiver's pair. - Decrypts the data with this secret.
Parameters
• data: string
Encrypted private data.
• sender: Entity
An object with pub
and epub
strings - the user.is object of the sender's account.
• receiver: any
SEA Pair of the receiver – epriv
key will be used to decrypt the data.
Returns
Promise
<string
>
- Decrypted data.