mirror of
https://github.com/node-ebics/node-ebics-client.git
synced 2024-11-21 21:52:07 +00:00
fit: BankLetter.js get key size
This commit is contained in:
parent
836ec0ebf3
commit
ce6cd02e58
@ -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(' ');
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user