contract/business/NotarizeOps.js
/**
     * 
     * @param {BeanDataBlock} blockData Data block with the set of process information.
     */
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
async validateIssuerRecipients(blockData) {
        let issuer = blockData.issuer;
        let recipientsHash = blockData.recipientsHash;
        let recipientsHashSignedByIssuer = blockData.recipientsHashSignedByIssuer;
        var verifyHashRecipients = false;
        verifyHashRecipients = await EccUtil.verifyMessageSigned(recipientsHash, recipientsHashSignedByIssuer, issuer);
        if (!verifyHashRecipients) {
            let msgError = 'Recipients Data Incorrect. Issuer Publick Key Not Validated';
            logWrite(`[validateIssuerRecipients] Message: ${msgError}`);
            throw msgError;
        }
        logWrite('[validateIssuerRecipients] Recipients Data Ckecked');
        return verifyHashRecipients;
    }
async validateIssuerRecipients ( blockData ) { let issuer = blockData . issuer ; let recipientsHash = blockData . recipientsHash ; let recipientsHashSignedByIssuer = blockData . recipientsHashSignedByIssuer ; var verifyHashRecipients = false ; verifyHashRecipients = await EccUtil . verifyMessageSigned ( recipientsHash , recipientsHashSignedByIssuer , issuer ) ; if ( ! verifyHashRecipients ) { let msgError = 'Recipients Data Incorrect. Issuer Publick Key Not Validated' ; logWrite ( ` ${ msgError } ` ) ; throw msgError ; } logWrite ( '[validateIssuerRecipients] Recipients Data Ckecked' ) ; return verifyHashRecipients ; }
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
// stop here // Recipients: OK ---------------------------------------