Home Manual Reference Source
import {Symmetric} from 'discretecrypt.js/src/discretecrypt.js'
public class | source

Symmetric

DiscreteCrypt Symmetric Utilities

Static Method Summary

Static Public Methods
public static

decrypt(inputKey: String | Buffer | Array, data: Object, options: Object=): *

Uses the Authenticated Encryption Mechanism from the DiscreteCrypt Protocol to symmetrically encrypt the data using a given input key.

public static

encrypt(inputKey: String | Buffer | Array, msg: *, options: Object=): *

Uses the Authenticated Encryption Mechanism from the DiscreteCrypt Protocol to symmetrically encrypt the data using a given input key.

Static Public Methods

public static decrypt(inputKey: String | Buffer | Array, data: Object, options: Object=): * source

Uses the Authenticated Encryption Mechanism from the DiscreteCrypt Protocol to symmetrically encrypt the data using a given input key.

Uses the input key rather than a DH Exchange.

Params:

NameTypeAttributeDescription
inputKey String | Buffer | Array
data Object
options Object=

Return:

*

public static encrypt(inputKey: String | Buffer | Array, msg: *, options: Object=): * source

Uses the Authenticated Encryption Mechanism from the DiscreteCrypt Protocol to symmetrically encrypt the data using a given input key.

Uses the input key rather than a DH Exchange.

Params:

NameTypeAttributeDescription
inputKey String | Buffer | Array
msg *
options Object=

Return:

*