diff --git a/lib/BankLetter.js b/lib/BankLetter.js index 1221b22..5c77a3b 100644 --- a/lib/BankLetter.js +++ b/lib/BankLetter.js @@ -13,10 +13,8 @@ const registerHelpers = () => { handlebars.registerHelper('now', () => moment().format('HH:mm:ss')); handlebars.registerHelper('keyExponentBits', k => Buffer.byteLength(k.e()) * 8); - // handlebars.registerHelper('keyExponentBits', k => Buffer.byteLength(new BN(k.key.keyPair.e).toBuffer()) * 8); - handlebars.registerHelper('keyModulusBits', k => k.key.getKeySize()); - // return Buffer.byteLength(new BN(k.key.keyPair.e).toBuffer()) * 8; + handlebars.registerHelper('keyModulusBits', k => k.size()); handlebars.registerHelper('keyExponent', k => k.e('hex')); @@ -24,7 +22,6 @@ const registerHelpers = () => { handlebars.registerHelper('sha256', (k) => { const digest = Buffer.from(Crypto.digestPublicKey(k), 'base64').toString('HEX'); - // const digest = Buffer.from(k.publicDigest(), 'base64').toString('HEX'); return digest.toUpperCase().match(/.{1,2}/g).join(' '); }); };