/third_party/node/test/parallel/ |
D | test-webcrypto-sign-verify-eddsa.js | 9 const { subtle } = require('crypto').webcrypto; 26 subtle.importKey( 32 subtle.importKey( 38 subtle.importKey( 44 subtle.generateKey( 48 subtle.generateKey( 57 subtle.generateKey( 66 assert(await subtle.verify({ name }, publicKey, signature, data)); 71 const p = subtle.verify({ name }, publicKey, sigcopy, copy); 78 subtle.verify({ name }, privateKey, signature, data), { [all …]
|
D | test-webcrypto-export-import.js | 10 const { subtle } = webcrypto; 17 subtle.importKey(format, keyData, {}, false, ['wrapKey']), { 22 subtle.importKey('not valid', keyData, {}, false, ['wrapKey']), { 26 subtle.importKey('raw', 1, {}, false, ['deriveBits']), { 30 subtle.importKey('raw', keyData, { 36 subtle.importKey('raw', keyData, { 44 subtle.importKey('raw', keyData, { 53 subtle.importKey('raw', keyData, { 62 subtle.importKey('jwk', null, { 78 const key = await subtle.importKey( [all …]
|
D | test-webcrypto-sign-verify-ecdsa.js | 9 const { subtle } = require('crypto').webcrypto; 28 subtle.importKey( 34 subtle.importKey( 40 subtle.importKey( 46 subtle.generateKey( 50 subtle.generateKey( 59 subtle.generateKey( 67 assert(await subtle.verify({ name, hash }, publicKey, signature, plaintext)); 72 const p = subtle.verify({ name, hash }, publicKey, sigcopy, copy); 79 subtle.verify({ name, hash }, privateKey, signature, plaintext), { [all …]
|
D | test-webcrypto-sign-verify-rsa.js | 9 const { subtle } = require('crypto').webcrypto; 29 subtle.importKey( 35 subtle.importKey( 41 subtle.importKey( 47 subtle.generateKey( 51 subtle.generateKey( 61 assert(await subtle.verify(algorithm, publicKey, signature, plaintext)); 66 const p = subtle.verify(algorithm, publicKey, sigcopy, copy); 73 subtle.verify(algorithm, privateKey, signature, plaintext), { 78 subtle.verify(algorithm, noVerifyPublicKey, signature, plaintext), { [all …]
|
D | test-webcrypto-sign-verify-hmac.js | 9 const { subtle } = require('crypto').webcrypto; 23 subtle.importKey( 29 subtle.importKey( 35 subtle.generateKey( 46 assert(await subtle.verify({ name, hash }, key, signature, plaintext)); 51 const p = subtle.verify({ name, hash }, key, sigcopy, copy); 58 subtle.verify({ name, hash }, noVerifyKey, signature, plaintext), { 64 subtle.verify({ name, hash }, rsaKeys.publicKey, signature, plaintext), { 72 assert(!(await subtle.verify( 77 assert(!(await subtle.verify( [all …]
|
D | test-webcrypto-sign-verify.js | 9 const { subtle } = require('crypto').webcrypto; 18 const { publicKey, privateKey } = await subtle.generateKey({ 25 const signature = await subtle.sign({ 29 assert(await subtle.verify({ 41 const { publicKey, privateKey } = await subtle.generateKey({ 48 const signature = await subtle.sign({ 53 assert(await subtle.verify({ 66 const { publicKey, privateKey } = await subtle.generateKey({ 71 const signature = await subtle.sign({ 76 assert(await subtle.verify({ [all …]
|
D | test-webcrypto-derivekey.js | 10 const { webcrypto: { subtle }, KeyObject } = require('crypto'); 19 subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']), 20 subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveKey']), 24 subtle.deriveKey({ 30 subtle.deriveKey({ 39 subtle.exportKey('raw', secret1), 40 subtle.exportKey('raw', secret2), 53 const key = await subtle.importKey( 59 const secret = await subtle.deriveKey({ 69 const raw = await subtle.exportKey('raw', secret); [all …]
|
D | test-webcrypto-derivebits-ecdh.js | 10 const { subtle } = webcrypto; 59 subtle.importKey( 68 subtle.importKey( 97 const bits = await subtle.deriveBits({ 108 const bits = await subtle.deriveBits({ 118 const bits = await subtle.deriveBits({ 128 const bits = await subtle.deriveBits({ 140 await assert.rejects(subtle.deriveBits({ 150 const bits = await subtle.deriveBits({ 165 subtle.deriveBits( [all …]
|
D | test-webcrypto-derivekey-ecdh.js | 10 const { subtle } = webcrypto; 54 subtle.importKey( 63 subtle.importKey( 96 const key = await subtle.deriveKey({ 101 const raw = await subtle.exportKey('raw', key); 108 const key = await subtle.deriveKey({ 117 const raw = await subtle.exportKey('raw', key); 127 subtle.deriveKey( 137 subtle.deriveKey( 150 subtle.deriveKey( [all …]
|
D | test-webcrypto-export-import-cfrg.js | 11 const { subtle } = crypto.webcrypto; 108 const key = await subtle.importKey( 121 const spki = await subtle.exportKey('spki', key); 127 subtle.exportKey('spki', key), { 134 subtle.importKey( 144 const key = await subtle.importKey( 157 const pkcs8 = await subtle.exportKey('pkcs8', key); 163 subtle.exportKey('pkcs8', key), { 169 subtle.importKey( 186 subtle.importKey( [all …]
|
D | test-webcrypto-derivebits-cfrg.js | 10 const { subtle } = webcrypto; 44 subtle.importKey( 50 subtle.importKey( 76 const bits = await subtle.deriveBits({ 87 const bits = await subtle.deriveBits({ 97 const bits = await subtle.deriveBits({ 107 const bits = await subtle.deriveBits({ 119 await assert.rejects(subtle.deriveBits({ 129 const bits = await subtle.deriveBits({ 144 subtle.deriveBits( [all …]
|
D | test-webcrypto-export-import-ec.js | 11 const { subtle } = crypto.webcrypto; 103 const key = await subtle.importKey( 117 const spki = await subtle.exportKey('spki', key); 123 subtle.exportKey('spki', key), { 130 subtle.importKey( 143 const key = await subtle.importKey( 157 const pkcs8 = await subtle.exportKey('pkcs8', key); 163 subtle.exportKey('pkcs8', key), { 169 subtle.importKey( 189 subtle.importKey( [all …]
|
D | test-webcrypto-derivekey-cfrg.js | 10 const { subtle } = webcrypto; 43 subtle.importKey( 49 subtle.importKey( 79 const key = await subtle.deriveKey({ 84 const raw = await subtle.exportKey('raw', key); 91 const key = await subtle.deriveKey({ 100 const raw = await subtle.exportKey('raw', key); 110 subtle.deriveKey( 120 subtle.deriveKey( 133 subtle.deriveKey( [all …]
|
D | test-webcrypto-encrypt-decrypt.js | 10 const { subtle } = webcrypto; 21 const { publicKey, privateKey } = await subtle.generateKey({ 28 const ciphertext = await subtle.encrypt({ 33 const plaintext = await subtle.decrypt({ 52 const key = await subtle.generateKey({ 57 const ciphertext = await subtle.encrypt( 61 const plaintext = await subtle.decrypt( 79 const key = await subtle.generateKey({ 84 const ciphertext = await subtle.encrypt( 88 const plaintext = await subtle.decrypt( [all …]
|
D | test-webcrypto-derivebits.js | 10 const { subtle } = require('crypto').webcrypto; 19 subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']), 20 subtle.generateKey({ name: 'ECDH', namedCurve }, true, ['deriveBits']), 24 subtle.deriveBits({ 27 subtle.deriveBits({ 44 const key = await subtle.importKey( 49 const secret = await subtle.deriveBits({ 76 const key = await subtle.importKey( 81 const secret = await subtle.deriveBits({ 108 subtle.generateKey({ name }, true, ['deriveBits']), [all …]
|
D | test-webcrypto-encrypt-decrypt-aes.js | 10 const { subtle } = webcrypto; 16 const key = await subtle.importKey( 23 const output = await subtle.encrypt(algorithm, key, plaintext); 32 const check = Buffer.from(await subtle.decrypt(algorithm, key, output)); 41 const key = await subtle.importKey( 48 return assert.rejects(subtle.encrypt(algorithm, key, plaintext), { 54 const key = await subtle.importKey( 61 const output = await subtle.encrypt(algorithm, key, plaintext); 63 return assert.rejects(subtle.decrypt(algorithm, key, output), { 70 const key = await subtle.importKey( [all …]
|
D | test-webcrypto-digest.js | 10 const { subtle } = require('crypto').webcrypto; 21 subtle.digest('SHA-512', Buffer.alloc(0)) 45 subtle.digest({ name: test[0] }, kData), 46 subtle.digest({ name: test[0], length: test[2] }, kData), 47 subtle.digest(test[0], kData), 48 subtle.digest(test[0], kData.buffer), 49 subtle.digest(test[0], new DataView(kData.buffer)), 50 subtle.digest(test[0], Buffer.from(kData)), 70 assert.rejects(subtle.digest(i, Buffer.alloc(0)), { 76 assert.rejects(subtle.digest('', Buffer.alloc(0)), { [all …]
|
D | test-webcrypto-export-import-rsa.js | 11 const { subtle } = crypto.webcrypto; 303 const key = await subtle.importKey( 320 const spki = await subtle.exportKey('spki', key); 326 subtle.exportKey('spki', key), { 337 const key = await subtle.importKey( 354 const pkcs8 = await subtle.exportKey('pkcs8', key); 360 subtle.exportKey('pkcs8', key), { 366 subtle.importKey( 387 subtle.importKey( 398 subtle.importKey( [all …]
|
/third_party/node/test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/ |
D | cfrg_curves_keys.js | 4 var subtle = self.crypto.subtle; 18 privateKey = await subtle.importKey("pkcs8", pkcs8[algorithmName], 21 publicKey = await subtle.importKey("spki", test.vector, 24 … derived = await subtle.deriveKey({name: algorithmName, public: publicKey}, privateKey, 42 … let key = await subtle.generateKey({name: algorithmName}, true, ["deriveKey", "deriveBits"]); 43 …derived = await subtle.deriveKey({name: algorithmName, public: key.publicKey}, key.privateKey, {na… 60 …return subtle.deriveKey({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[algo… 61 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) 71 …return subtle.deriveKey({name: algorithmName.toLowerCase(), public: publicKeys[algorithmName]}, pr… 72 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) [all …]
|
D | ecdh_keys.js | 4 var subtle = self.crypto.subtle; 40 …return subtle.deriveKey({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], {… 41 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) 51 …return subtle.deriveKey({name: "EcDh", public: publicKeys[namedCurve]}, privateKeys[namedCurve], {… 52 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) 63 …return subtle.deriveKey({name: "ECDH"}, privateKeys[namedCurve], {name: "HMAC", hash: "SHA-256", l… 64 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) 74 …return subtle.deriveKey({name: "ECDH", public: {message: "Not a CryptoKey"}}, privateKeys[namedCur… 75 .then(function(key) {return crypto.subtle.exportKey("raw", key);}) 89 …return subtle.deriveKey({name: "ECDH", public: publicKey}, privateKeys[namedCurve], {name: "HMAC",… [all …]
|
D | cfrg_curves_bits.js | 4 var subtle = self.crypto.subtle; 18 privateKey = await subtle.importKey("pkcs8", pkcs8[algorithmName], 21 publicKey = await subtle.importKey("spki", test.vector, 24 …derived = await subtle.deriveBits({name: algorithmName, public: publicKey}, privateKey, 8 * sizes[… 44 …return subtle.deriveBits({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[alg… 54 …return subtle.deriveBits({name: algorithmName.toLowerCase(), public: publicKeys[algorithmName]}, p… 64 …return subtle.deriveBits({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[alg… 74 …return subtle.deriveBits({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[alg… 84 …return subtle.deriveBits({name: algorithmName, public: publicKeys[algorithmName]}, privateKeys[alg… 96 …return subtle.deriveBits({name: algorithmName}, privateKeys[algorithmName], 8 * sizes[algorithmNam… [all …]
|
D | ecdh_bits.js | 4 var subtle = self.crypto.subtle; 40 …return subtle.deriveBits({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], … 50 …return subtle.deriveBits({name: "EcDh", public: publicKeys[namedCurve]}, privateKeys[namedCurve], … 60 …return subtle.deriveBits({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], … 70 …return subtle.deriveBits({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], … 80 …return subtle.deriveBits({name: "ECDH", public: publicKeys[namedCurve]}, privateKeys[namedCurve], … 92 … return subtle.deriveBits({name: "ECDH"}, privateKeys[namedCurve], 8 * sizes[namedCurve]) 102 …return subtle.deriveBits({name: "ECDH", public: {message: "Not a CryptoKey"}}, privateKeys[namedCu… 116 …return subtle.deriveBits({name: "ECDH", public: publicKey}, privateKeys[namedCurve], 8 * sizes[nam… 126 …return subtle.deriveBits({name: "ECDH", public: ecdsaKeyPairs[namedCurve].publicKey}, privateKeys[… [all …]
|
D | hkdf.js | 4 var subtle = self.crypto.subtle; 40 return subtle.deriveBits(algorithm, baseKeys[derivedKeySize], 256) 50 return subtle.deriveBits(algorithm, baseKeys[derivedKeySize], 0) 69 …return subtle.deriveKey(algorithm, baseKeys[derivedKeySize], derivedKeyType.algorithm, true, deriv… 72 return subtle.exportKey("raw", key) 90 …return subtle.deriveKey(badAlgorithm, baseKeys[derivedKeySize], derivedKeyType.algorithm, true, de… 100 …return subtle.deriveKey(algorithm, noKey[derivedKeySize], derivedKeyType.algorithm, true, derivedK… 110 …return subtle.deriveKey(algorithm, wrongKey, derivedKeyType.algorithm, true, derivedKeyType.usages) 124 …return subtle.deriveBits({name: "HKDF", info: infos[infoSize], hash: hashName}, baseKeys[derivedKe… 134 …return subtle.deriveBits({name: "HKDF", salt: salts[saltSize], hash: hashName}, baseKeys[derivedKe… [all …]
|
/third_party/gn/src/base/memory/ |
D | ref_counted.h | 19 namespace subtle { 187 static constexpr ::base::subtle::StartRefCountFromOneTag \ 188 kRefCountPreference = ::base::subtle::kStartRefCountFromOneTag 201 class RefCounted : public subtle::RefCountedBase { 203 static constexpr subtle::StartRefCountFromZeroTag kRefCountPreference = 204 subtle::kStartRefCountFromZeroTag; 206 RefCounted() : subtle::RefCountedBase(T::kRefCountPreference) {} in RefCounted() 208 void AddRef() const { subtle::RefCountedBase::AddRef(); } in AddRef() 211 if (subtle::RefCountedBase::Release()) { in Release() 268 class RefCountedThreadSafe : public subtle::RefCountedThreadSafeBase { [all …]
|
/third_party/node/test/pummel/ |
D | test-webcrypto-derivebits-pbkdf2.js | 14 const { subtle } = require('crypto').webcrypto; 374 subtle.importKey( 383 subtle.importKey( 392 subtle.importKey( 402 subtle.generateKey( 426 const bits = await subtle.deriveBits(algorithm, baseKeys[size], 256); 449 subtle.deriveBits(algorithm, baseKeys[size], undefined), { 453 subtle.deriveBits(algorithm, baseKeys[size], 0), { 458 subtle.deriveBits(algorithm, baseKeys[size], null), { 463 subtle.deriveBits(algorithm, baseKeys[size], 15), { [all …]
|