graphene-pk11
Advanced tools
Comparing version 2.0.28 to 2.0.29
@@ -25,4 +25,16 @@ "use strict"; | ||
}; | ||
Collection.prototype.indexOf = function (obj, fromIndex) { | ||
if (fromIndex === void 0) { fromIndex = 0; } | ||
if (obj.lib !== this.lib) { | ||
} | ||
for (var i = fromIndex; i < this.items_.length; i++) { | ||
var item = this.items(i); | ||
if (item.handle.equals(obj.handle)) { | ||
return i; | ||
} | ||
} | ||
return -1; | ||
}; | ||
return Collection; | ||
}(object.BaseObject)); | ||
exports.Collection = Collection; |
@@ -27,5 +27,5 @@ "use strict"; | ||
tslib_1.__extends(Mechanism, _super); | ||
function Mechanism(handle, slotHandle, lib) { | ||
var _this = _super.call(this, lib) || this; | ||
_this.handle = handle; | ||
function Mechanism(type, handle, slotHandle, lib) { | ||
var _this = _super.call(this, handle, lib) || this; | ||
_this.type = type; | ||
_this.slotHandle = slotHandle; | ||
@@ -37,3 +37,3 @@ _this.getInfo(); | ||
get: function () { | ||
return mech_enum_1.MechanismEnum[this.handle] || "unknown"; | ||
return mech_enum_1.MechanismEnum[this.type] || "unknown"; | ||
}, | ||
@@ -44,3 +44,3 @@ enumerable: true, | ||
Mechanism.prototype.getInfo = function () { | ||
var info = this.lib.C_GetMechanismInfo(this.slotHandle, this.handle); | ||
var info = this.lib.C_GetMechanismInfo(this.slotHandle, this.type); | ||
this.minKeySize = info.minKeySize; | ||
@@ -97,3 +97,3 @@ this.maxKeySize = info.maxKeySize; | ||
return Mechanism; | ||
}(core.BaseObject)); | ||
}(core.HandleObject)); | ||
exports.Mechanism = Mechanism; | ||
@@ -109,4 +109,7 @@ var MechanismCollection = (function (_super) { | ||
MechanismCollection.prototype.items = function (index) { | ||
var handle = this.items_[index]; | ||
return new Mechanism(handle, this.slotHandle, this.lib); | ||
var type = this.items_[index]; | ||
var handle = new Buffer(8); | ||
handle.fill(0); | ||
handle.writeInt32LE(type, 0); | ||
return new Mechanism(type, handle, this.slotHandle, this.lib); | ||
}; | ||
@@ -113,0 +116,0 @@ return MechanismCollection; |
@@ -37,4 +37,5 @@ "use strict"; | ||
}; | ||
Slot.prototype.initToken = function (pin) { | ||
return this.lib.C_InitToken(this.handle, pin); | ||
Slot.prototype.initToken = function (pin, label) { | ||
if (label === void 0) { label = ''; } | ||
return this.lib.C_InitToken(this.handle, pin, label); | ||
}; | ||
@@ -41,0 +42,0 @@ Slot.prototype.open = function (flags) { |
@@ -143,2 +143,3 @@ **[SafeNet Luna G5](http://www.safenet-inc.com/data-encryption/hardware-security-modules-hsms/luna-hsms-key-management/luna-G5-usb-attached-hsm/) PKCS #11 DEVICE CAPABILITIES** | ||
##### Encryption | ||
> test enc -it 200 -a all | ||
@@ -145,0 +146,0 @@ |
@@ -25,2 +25,4 @@ **SoftHSM2 PKCS#11 DEVICE CAPABILITIES** | ||
> slot algs -s 0 | ||
| Algorithm name | h | s | v | e | d | w | u | g | D | | ||
@@ -100,9 +102,5 @@ |---------------------------|---|---|---|---|---|---|---|---|---| | ||
##### Encryption | ||
Module info | ||
Library: /usr/local/lib/softhsm/libsofthsm2.so | ||
Name: SoftHSM2 | ||
Cryptoki version: 2.30 | ||
> test enc -it 200 -a all | ||
Session is started | ||
@@ -117,9 +115,5 @@ | Algorithm | Encrypt | Decrypt | Encrypt/s | Decrypt/s | | ||
##### Signing | ||
Module info | ||
Library: /usr/local/lib/softhsm/libsofthsm2.so | ||
Name: SoftHSM2 | ||
Cryptoki version: 2.30 | ||
> test sign -it 200 -a all | ||
Session is started | ||
@@ -134,10 +128,5 @@ | Algorithm | Sign | Verify | Sign/s | Verify/s | | ||
##### Key generation | ||
Module info | ||
Library: /usr/local/lib/softhsm/libsofthsm2.so | ||
Name: SoftHSM2 | ||
Cryptoki version: 2.30 | ||
> test gen -it 5 -a all | ||
Session is started | ||
| Algorithm | Generate | Generate/s | | ||
@@ -144,0 +133,0 @@ |---------------------------|---------:|-----------:| |
@@ -21,4 +21,4 @@ **Thales nShield PKCS#11 DEVICE CAPABILITIES** | ||
============================== | ||
> slot algs -s 0 | ||
| Algorithm name | h | s | v | e | d | w | u | g | D | | ||
@@ -138,2 +138,4 @@ |---------------------------|---|---|---|---|---|---|---|---|---| | ||
> test gen -it 5 -a all | ||
| Algorithm | Generate | Generate/s | | ||
@@ -153,2 +155,4 @@ |---------------------------|---------:|-----------:| | ||
##### Signing | ||
> test sign -it 200 -a all | ||
@@ -166,2 +170,4 @@ | Algorithm | Sign | Verify | Sign/s | Verify/s | | ||
##### Encryption | ||
> test enc -it 200 -a all | ||
@@ -168,0 +174,0 @@ | Algorithm | Encrypt | Decrypt | Encrypt/s | Decrypt/s | |
@@ -137,2 +137,4 @@ **Thales nShield Solo+ PKCS#11 DEVICE CAPABILITIES** | ||
> test gen -it 5 -a all | ||
| Algorithm | Generate | Generate/s | | ||
@@ -151,3 +153,5 @@ |---------------------------|---------:|-----------:| | ||
##### Signing | ||
> test sign -it 200 -a all | ||
| Algorithm | Sign | Verify | Sign/s | Verify/s | | ||
@@ -160,2 +164,4 @@ |---------------------------|---------:|---------:|----------:|----------:| | ||
##### Encryption | ||
> test enc -it 200 -a all | ||
@@ -162,0 +168,0 @@ | Algorithm | Encrypt | Decrypt | Encrypt/s | Decrypt/s | |
@@ -1,5 +0,7 @@ | ||
##Device Capabilities | ||
## Device Capabilities | ||
- [SoftHSM2](capabilities/SoftHSM2.md) | ||
- [Thales nShield Solo+](capabilities/ThalesNShieldSoloPlus.md) | ||
- [Safenet Luna G5](capabilities/SoftHSM2.md) | ||
- [Thales nShield](capabilities/ThalesNShield.md) | ||
- [Thales nShield PCI 500 F3](capabilities/ThalesNShieldPCI500F3.md) | ||
- [Safenet Luna G5](capabilities//SafenetLunaG5.md) |
{ | ||
"name": "graphene-pk11", | ||
"version": "2.0.28", | ||
"version": "2.0.29", | ||
"description": "A simple layer for interacting with PKCS #11 / PKCS11 / CryptoKI for Node in TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "./build/graphene.js", |
@@ -21,6 +21,6 @@ { | ||
}, | ||
"mechanisms": 67 | ||
"mechanisms": 68 | ||
}, | ||
"slotsCount": 2 | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
6515
317770
75