diff --git a/README.md b/README.md index 17aa2e7..fa964dd 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,25 @@ npm install mocha ``` +## Supported algorithms + +| Algorithm name | generateKey | digest | export/import | sign/verify | encrypt/decrypt | wrapKey/unwrapKey | derive | +|-------------------|-------------|---------|---------------|-------------|-----------------|-------------------|---------| +| SHA-1 | | X | | | | | | +| SHA-256 | | X | | | | | | +| SHA-384 | | X | | | | | | +| SHA-512 | | X | | | | | | +| RSASSA-PKCS1-v1_5 | X | | X | X | | | | +| RSA-PSS | X | | X | X | | | | +| RSA-OAEP | X | | X | | X | X | | +| AES-CBC | X | | X | | X | X | | +| AES-GCM | X | | X | | X | X | | +| AES-KW | X | | X | | | X | | +| ECDSA | X | | X | X | | | | +| ECDH | X | | X | | | | X | +| HMAC | X | | X | X | | | | +| PBKDF2 | | | X | | | | X | + ## KeyStorage To use KeyStorage you shoud init WebCrypto with `directory` option. If `directory` option is missing then `keyStorage` is `null` diff --git a/test/pbkdf2.js b/test/pbkdf2.js index 45a9bbd..2e41b4e 100644 --- a/test/pbkdf2.js +++ b/test/pbkdf2.js @@ -29,7 +29,7 @@ context("WebCrypto", () => { context("deriveBits", () => { [8, 16, 128, 256, 512].forEach(length => { it(`lenght:${length}`, done => { - webcrypto.subtle.importKey("raw", new Buffer("password"), "pbkdf2", true, ["deriveBits"]) + webcrypto.subtle.importKey("raw", new Buffer("password"), "pbkdf2", false, ["deriveBits"]) .then(key => { assert.equal(!!key, true); return webcrypto.subtle.deriveBits( @@ -51,7 +51,7 @@ context("WebCrypto", () => { context(name, () => { [128, 192, 256].forEach(length => { it(`length:${length}`, done => { - webcrypto.subtle.importKey("raw", new Buffer("password"), "pbkdf2", true, ["deriveKey"]) + webcrypto.subtle.importKey("raw", new Buffer("password"), "pbkdf2", false, ["deriveKey"]) .then(key => { assert.equal(!!key, true); return webcrypto.subtle.deriveKey(