application/docIssue.js
/**
     * Prepare a single recipient to add in the array of recipients.
     * @param {BeanUser} persona 
     */
Prepare a single recipient to add in the array of recipients.
Prepare a single recipient to add in the array of recipients .
async function prepareRecipientToAdd(persona) {
        let recipient = BeanUser.createBeanUser(persona);
        buffHashDestination = buffHashDestination + recipient.publicId.toString();
        let pwdEncryptedBase64 = await EccUtil.encryptMessage(issuerPGP, passwordBase64, recipient);
        logWrite('[prepareRecipientToAdd] pwdEncryptedBase64 = ' + pwdEncryptedBase64);
        recipient.setPassword(pwdEncryptedBase64);
        let initVecBase64Encrypted = await EccUtil.encryptMessage(issuerPGP, initVectorBase64, recipient);
        logWrite('[prepareRecipientToAdd] initVecBase64Encrypted = ' + initVecBase64Encrypted);
        recipient.setInitVector(initVecBase64Encrypted);
        recipient.clearSecurityData();
        return recipient;
    }
async function prepareRecipientToAdd ( persona ) { let recipient = BeanUser . createBeanUser ( persona ) ; buffHashDestination = buffHashDestination + recipient . publicId . toString ( ) ; let pwdEncryptedBase64 = await EccUtil . encryptMessage ( issuerPGP , passwordBase64 , recipient ) ; logWrite ( '[prepareRecipientToAdd] pwdEncryptedBase64 = ' + pwdEncryptedBase64 ) ; recipient . setPassword ( pwdEncryptedBase64 ) ; let initVecBase64Encrypted = await EccUtil . encryptMessage ( issuerPGP , initVectorBase64 , recipient ) ; logWrite ( '[prepareRecipientToAdd] initVecBase64Encrypted = ' + initVecBase64Encrypted ) ; recipient . setInitVector ( initVecBase64Encrypted ) ; recipient . clearSecurityData ( ) ; return recipient ; }
Prepare a single recipient to add in the array of recipients.
Prepare a single recipient to add in the array of recipients .
// Get Recipient User // Concatenation of Recipients' public key hashes sequence // Encrypt the AES password using the Recipient public key // Add encrypted password to the Recipient object // Encrypt the inicialization vector using the Recipient's public key // Add encrypted inicialization vector to the Recipient object // Prevents the private dataset from being inside the user's data