Hi Folks,
What is the way to get the public key length using openpgp.key.readArmored
I have this code:      var publicKeys = openpgp.key.readArmored(pubkey);      
console.log(publicKeys);//is a key object
                userid = publicKeys.keys[0].users[0].userId.userid;
How do I get the Public Key length (1024, 4096 etc)??
The answer may be somewhere in 
here:https://github.com/openpgpjs/openpgpjs/blob/master/src/packet/public_key.js
/** * Returns bit size of key * @return {int} Number of bits 
*/PublicKey.prototype.getBitSize = function () {  return 
this.mpi[0].byteLength() * 8;};
Not sure how to invoke this though, 

What am I missing?

Thanks


 Barry
                                          
_______________________________________________

http://openpgpjs.org
Subscribe/unsubscribe: http://list.openpgpjs.org

Reply via email to