Module for Whiteflag cryptographic functions
- Source:
- Tutorials:
Members
(inner, constant) authenticationParameters :Object
Defines the Whiteflag secret authentication token parameters as per par 5.2.3 of the WF specification
Type:
- Object
- Source:
(inner, constant) encryptionParameters :Object
Defines the Whiteflag encryption parameters as per par 5.2.3 of the WF specification
Type:
- Object
- Source:
Methods
(inner) decryptMessage(wfMessage, encodedMessage, callback)
Decrypts a binary encoded encrypted Whiteflag message
Parameters:
Name | Type | Description |
---|---|---|
wfMessage |
wfMessage | a Whiteflag message |
encodedMessage |
buffer | a binary encoded and encrypted Whiteflag message |
callback |
function | function to be called upon completion |
- Source:
(inner) encryptMessage(wfMessage, encodedMessage, callback)
Encrypts a binary encoded Whiteflag message
Parameters:
Name | Type | Description |
---|---|---|
wfMessage |
wfMessage | a Whiteflag message |
encodedMessage |
buffer | an unencrypted binary encoded Whiteflag message |
callback |
function | function to be called upon completion |
- Source:
Type Definitions
newKey
Generates ECDH key pair and provides the public key
Type:
- string
- Source:
secret
Generates a shared secret based on incoming public ECDH key pair and provides the public key
Type:
- string
- Source:
verificationData
Generates verification data from shared secret authentication token
Type:
- Buffer
- Source: