Remove keyring from openpgp namespace. Optimize keyid initialization.
This commit is contained in:
parent
b544343c63
commit
1be6b8b858
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,6 @@
|
|||
|
||||
module.exports = require('./openpgp.js');
|
||||
module.exports.key = require('./key.js');
|
||||
module.exports.keyring = require('./keyring.js');
|
||||
module.exports.message = require('./message.js');
|
||||
module.exports.util = require('./util');
|
||||
module.exports.packet = require('./packet');
|
||||
|
|
|
@ -27,11 +27,15 @@ var util = require('../util');
|
|||
*/
|
||||
module.exports = function keyid() {
|
||||
|
||||
this.bytes = '';
|
||||
|
||||
// initialize keyid with 0x0000000000000000
|
||||
var strArray = [];
|
||||
var zero = String.fromCharCode(0);
|
||||
for (var i = 0; i < 8; i++) {
|
||||
this.bytes += String.fromCharCode(0);
|
||||
strArray[i] = zero;
|
||||
}
|
||||
this.bytes = strArray.join('');
|
||||
|
||||
|
||||
/**
|
||||
* Parsing method for a key id
|
||||
* @param {String} input Input to read the key id from
|
||||
|
|
|
@ -2,7 +2,7 @@ var unit = require('../unit.js');
|
|||
|
||||
unit.register("Testing of binary signature checking", function() {
|
||||
var openpgp = require('../../');
|
||||
var keyring = openpgp.keyring;
|
||||
var keyring = require('../../src/keyring.js');
|
||||
var result = [];
|
||||
var priv_key = openpgp.key.readArmored([
|
||||
'-----BEGIN PGP PRIVATE KEY BLOCK-----',
|
||||
|
|
|
@ -2,7 +2,6 @@ var unit = require('../unit.js');
|
|||
|
||||
unit.register("Key generation/encryption/decryption", function() {
|
||||
var openpgp = require('../../');
|
||||
var keyring = openpgp.keyring;
|
||||
var result = [];
|
||||
var testHelper = function(passphrase, userid, message) {
|
||||
var key = openpgp.generateKeyPair(openpgp.enums.publicKey.rsa_encrypt_sign, 512,
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user