update function documentation
This commit is contained in:
parent
74ef7455f5
commit
016490656f
|
@ -52,7 +52,7 @@ function initWorker(path) {
|
|||
|
||||
/**
|
||||
* Encrypts message text with keys
|
||||
* @param {Array<module:key~Key>} keys array of keys, used to encrypt the message
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} keys array of keys or single key, used to encrypt the message
|
||||
* @param {String} text message as native JavaScript string
|
||||
* @param {function} callback (optional) callback(error, result) for async style
|
||||
* @return {String} encrypted ASCII armored message
|
||||
|
@ -79,7 +79,7 @@ function encryptMessage(keys, text, callback) {
|
|||
|
||||
/**
|
||||
* Signs message text and encrypts it
|
||||
* @param {Array<module:key~Key>} publicKeys array of keys, used to encrypt the message
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key, used to encrypt the message
|
||||
* @param {module:key~Key} privateKey private key with decrypted secret key data for signing
|
||||
* @param {String} text message as native JavaScript string
|
||||
* @param {function} callback (optional) callback(error, result) for async style
|
||||
|
@ -130,7 +130,7 @@ function decryptMessage(privateKey, msg, callback) {
|
|||
/**
|
||||
* Decrypts message and verifies signatures
|
||||
* @param {module:key~Key} privateKey private key with decrypted secret key data
|
||||
* @param {Array<module:key~Key>} publicKeys public keys to verify signatures
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key, to verify signatures
|
||||
* @param {module:message~Message} msg the message object with signed and encrypted data
|
||||
* @param {function} callback (optional) callback(error, result) for async style
|
||||
* @return {{text: String, signatures: Array<{keyid: module:type/keyid, valid: Boolean}>}}
|
||||
|
@ -162,7 +162,7 @@ function decryptAndVerifyMessage(privateKey, publicKeys, msg, callback) {
|
|||
|
||||
/**
|
||||
* Signs a cleartext message
|
||||
* @param {Array<module:key~Key>} privateKeys private key with decrypted secret key data to sign cleartext
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} privateKeys array of keys or single key with decrypted secret key data to sign cleartext
|
||||
* @param {String} text cleartext
|
||||
* @param {function} callback (optional) callback(error, result) for async style
|
||||
* @return {String} ASCII armored message
|
||||
|
@ -187,7 +187,7 @@ function signClearMessage(privateKeys, text, callback) {
|
|||
|
||||
/**
|
||||
* Verifies signatures of cleartext signed message
|
||||
* @param {Array<module:key~Key>} publicKeys public keys to verify signatures
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key, to verify signatures
|
||||
* @param {module:cleartext~CleartextMessage} msg cleartext message object with signatures
|
||||
* @param {function} callback (optional) callback(error, result) for async style
|
||||
* @return {{text: String, signatures: Array<{keyid: module:type/keyid, valid: Boolean}>}}
|
||||
|
|
|
@ -96,7 +96,7 @@ AsyncProxy.prototype.terminate = function() {
|
|||
|
||||
/**
|
||||
* Encrypts message text with keys
|
||||
* @param {Array<module:key~Key>} keys array of keys, used to encrypt the message
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} keys array of keys or single key, used to encrypt the message
|
||||
* @param {String} text message as native JavaScript string
|
||||
* @param {Function} callback receives encrypted ASCII armored message
|
||||
*/
|
||||
|
@ -117,7 +117,7 @@ AsyncProxy.prototype.encryptMessage = function(keys, text, callback) {
|
|||
|
||||
/**
|
||||
* Signs message text and encrypts it
|
||||
* @param {Array<module:key~Key>} publicKeys array of keys, used to encrypt the message
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key, used to encrypt the message
|
||||
* @param {module:key~Key} privateKey private key with decrypted secret key data for signing
|
||||
* @param {String} text message as native JavaScript string
|
||||
* @param {Function} callback receives encrypted ASCII armored message
|
||||
|
@ -159,7 +159,7 @@ AsyncProxy.prototype.decryptMessage = function(privateKey, message, callback) {
|
|||
/**
|
||||
* Decrypts message and verifies signatures
|
||||
* @param {module:key~Key} privateKey private key with decrypted secret key data
|
||||
* @param {Array<module:key~Key>} publicKeys public keys to verify signatures
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key to verify signatures
|
||||
* @param {module:message~Message} message the message object with signed and encrypted data
|
||||
* @param {Function} callback receives decrypted message as as native JavaScript string
|
||||
* with verified signatures or null if no literal data found
|
||||
|
@ -191,7 +191,7 @@ AsyncProxy.prototype.decryptAndVerifyMessage = function(privateKey, publicKeys,
|
|||
|
||||
/**
|
||||
* Signs a cleartext message
|
||||
* @param {Array<module:key~Key>} privateKeys private key with decrypted secret key data to sign cleartext
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} privateKeys array of keys or single key, with decrypted secret key data to sign cleartext
|
||||
* @param {String} text cleartext
|
||||
* @param {Function} callback receives ASCII armored message
|
||||
*/
|
||||
|
@ -212,7 +212,7 @@ AsyncProxy.prototype.signClearMessage = function(privateKeys, text, callback) {
|
|||
|
||||
/**
|
||||
* Verifies signatures of cleartext signed message
|
||||
* @param {Array<module:key~Key>} publicKeys public keys to verify signatures
|
||||
* @param {(Array<module:key~Key>|module:key~Key)} publicKeys array of keys or single key, to verify signatures
|
||||
* @param {module:cleartext~CleartextMessage} message cleartext message object with signatures
|
||||
* @param {Function} callback receives cleartext with status of verified signatures
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user