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 verifyIssuer(blockData) {
        let issuer = blockData.issuer;
        let hashFromUserInfos = BeanUser.generateHashFromUserInfos(issuer);
        logWrite(`[verifyIssuer] hashFromUserInfos: ${hashFromUserInfos}`);
        let signatureOfUserInfos = issuer.signatureOfUserInfos;
        logWrite(`[verifyIssuer] signatureOfUserInfos: ${signatureOfUserInfos} `);
        var verifyHashIssuer = false;
        verifyHashIssuer = await EccUtil.verifyMessageSigned(hashFromUserInfos, signatureOfUserInfos, issuer);
        if (!verifyHashIssuer) {
            let msgError = 'Issuer Data Incorrect. Issuer Publick Key Not Validated';
            logWrite(`[verifyIssuer] Message: ${msgError}`);
            throw msgError;
        }
        logWrite(`[verifyIssuer] Issuer Data Ckecked`);
        return verifyHashIssuer;
    }
async verifyIssuer ( blockData ) { let issuer = blockData . issuer ; let hashFromUserInfos = BeanUser . generateHashFromUserInfos ( issuer ) ; logWrite ( ` ${ hashFromUserInfos } ` ) ; let signatureOfUserInfos = issuer . signatureOfUserInfos ; logWrite ( ` ${ signatureOfUserInfos } ` ) ; var verifyHashIssuer = false ; verifyHashIssuer = await EccUtil . verifyMessageSigned ( hashFromUserInfos , signatureOfUserInfos , issuer ) ; if ( ! verifyHashIssuer ) { let msgError = 'Issuer Data Incorrect. Issuer Publick Key Not Validated' ; logWrite ( ` ${ msgError } ` ) ; throw msgError ; } logWrite ( ` ` ) ; return verifyHashIssuer ; }
@param {BeanDataBlock} blockData Data block with the set of process information.
@param { BeanDataBlock } blockData Data block with the set of process information .
// Informacoes do Issuer // Informacoes publicas do Issuer assinadas por ele // stop here // Issuer: OK ---------------------------------------