Home
last modified time | relevance | path

Searched refs:crypto (Results 1 - 25 of 979) sorted by relevance

12345678910>>...40

/third_party/node/test/parallel/
H A Dtest-crypto-dh-stateless.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
9 assert.throws(() => crypto.diffieHellman(), {
15 assert.throws(() => crypto.diffieHellman(null), {
21 assert.throws(() => crypto.diffieHellman([]), {
32 const buf1 = crypto.diffieHellman({
36 const buf2 = crypto.diffieHellman({
46 const alicePrivateKey = crypto.createPrivateKey({
60 const alicePublicKey = crypto
[all...]
H A Dtest-crypto-sign-verify.js4 common.skip('missing crypto');
10 const crypto = require('crypto');
19 const Sign = crypto.Sign;
26 const Verify = crypto.Verify;
43 crypto.createSign('sha1').sign(
60 crypto.createSign('SHA1')
64 padding: crypto.constants.RSA_PKCS1_OAEP_PADDING
74 () => crypto.createVerify('SHA256').verify({
85 () => crypto
[all...]
H A Dtest-crypto-rsa-dsa.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
9 const constants = crypto.constants;
57 let encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt);
65 crypto.publicEncrypt(ab, ab2enc);
66 crypto.publicEncrypt(new Uint8Array(ab), new Uint8Array(ab2enc));
67 crypto.publicEncrypt(new DataView(ab), new DataView(ab2enc));
68 otherEncrypted = crypto.publicEncrypt({
74 let decryptedBuffer = crypto
[all...]
H A Dtest-crypto-rsa-dsa-revert.js5 common.skip('missing crypto');
8 const crypto = require('crypto');
10 const constants = crypto.constants;
58 let encryptedBuffer = crypto.publicEncrypt(rsaPubPem, bufferToEncrypt);
66 crypto.publicEncrypt(ab, ab2enc);
67 crypto.publicEncrypt(new Uint8Array(ab), new Uint8Array(ab2enc));
68 crypto.publicEncrypt(new DataView(ab), new DataView(ab2enc));
69 otherEncrypted = crypto.publicEncrypt({
75 let decryptedBuffer = crypto
[all...]
H A Dtest-crypto-cipher-decipher.js5 common.skip('missing crypto');
10 const crypto = require('crypto');
18 ['crypto.createCipher is deprecated.', 'DEP0106'],
25 const cipher = crypto.createCipher('aes192', key);
33 const decipher = crypto.createDecipher('aes192', key);
43 const cStream = crypto.createCipher('aes192', key);
47 const dStream = crypto.createDecipher('aes192', key);
62 const cipher = crypto.createCipher('aes256', key);
69 const decipher = crypto
[all...]
H A Dtest-crypto.js26 common.skip('missing crypto');
30 ['crypto.createCipher is deprecated.', 'DEP0106'],
35 const crypto = require('crypto');
97 () => crypto.createHash('sha1').update({ foo: 'bar' }),
121 const cryptoCiphers = crypto.getCiphers();
122 assert(crypto.getCiphers().includes('aes-128-cbc'));
126 const { ivLength, keyLength, mode } = crypto.getCipherInfo(algo);
132 crypto.createCipheriv(algo,
133 crypto
[all...]
H A Dtest-crypto-cipheriv-decipheriv.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
15 const cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
19 const decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv);
30 const cStream = crypto.createCipheriv('des-ede3-cbc', key, iv);
34 const dStream = crypto.createDecipheriv('des-ede3-cbc', key, iv);
49 const cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
53 const decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv);
67 const cipher = crypto
[all...]
H A Dtest-crypto-pbkdf2.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
11 crypto.pbkdf2Sync(password, salt, iterations, keylen, hash);
13 crypto.pbkdf2(password, salt, iterations, keylen, hash,
59 () => crypto.pbkdf2('password', 'salt', 1, 20, 'sha1'),
68 () => crypto.pbkdf2Sync('password', 'salt', iterations, 20, 'sha1'),
79 crypto.pbkdf2Sync('password', 'salt', 1, notNumber, 'sha256');
91 crypto.pbkdf2('password', 'salt', 1, input, 'sha256',
104 crypto
[all...]
H A Dtest-crypto-scrypt.js5 common.skip('missing crypto');
8 const crypto = require('crypto');
11 if (typeof internalBinding('crypto').ScryptJob !== 'function')
162 const actual = crypto.scryptSync(pass, salt, keylen, options);
164 crypto.scrypt(pass, salt, keylen, options, common.mustSucceed((actual) => {
173 assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),
175 assert.throws(() => crypto.scryptSync('pass', 'salt', 1, options),
183 assert.throws(() => crypto.scrypt('pass', 'salt', 1, options, () => {}),
185 assert.throws(() => crypto
[all...]
H A Dtest-crypto-binary-default.js25 // This is the same as test/simple/test-crypto, but from before the shift
32 common.skip('missing crypto');
35 const crypto = require('crypto');
40 require('internal/crypto/util').setDefaultEncoding('latin1');
66 const hmacHash = crypto.createHmac('sha1', 'Node')
222 let result = crypto.createHmac(hash, testCase.key)
350 crypto.createHmac('md5', testCase.key)
359 crypto.createHmac('sha1', testCase.key)
368 const a1 = crypto
[all...]
H A Dtest-crypto-async-sign-verify.js4 common.skip('missing crypto');
8 const crypto = require('crypto');
20 let privateKey = crypto.createPrivateKey(privatePem);
21 let publicKey = crypto.createPublicKey(publicPem);
43 const expected = crypto.sign(algorithm, data, privateKey);
46 crypto.sign(algorithm, data, key, common.mustSucceed((actual) => {
52 crypto.verify(algorithm, data, key, actual), true);
59 crypto.verify(algorithm, data, key, expected, common.mustSucceed(
62 crypto
[all...]
H A Dtest-crypto-authenticated.js25 common.skip('missing crypto');
28 const crypto = require('crypto');
32 crypto.DEFAULT_ENCODING = 'buffer';
50 const ciphers = crypto.getCiphers();
77 ['crypto.DEFAULT_ENCODING is deprecated.', 'DEP0091'],
78 ['crypto.createCipher is deprecated.', 'DEP0106'],
114 const encrypt = crypto.createCipheriv(test.algo,
136 crypto.createDecipheriv(test.algo,
142 const decrypt = crypto
[all...]
H A Dtest-crypto-dh-errors.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
12 assert.throws(() => crypto.createDiffieHellman(13.37), {
19 assert.throws(() => crypto.createDiffieHellman('abcdef', 13.37), {
28 assert.throws(() => crypto.createDiffieHellman(bits), {
34 assert.throws(() => crypto.createDiffieHellman(bits), {
48 assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
49 assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
60 assert.throws(() => crypto
[all...]
H A Dtest-crypto-dh.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
11 const dh1 = crypto.createDiffieHellman(size);
13 const dh2 = crypto.createDiffieHellman(p1, 'buffer');
27 const dh3 = crypto.createDiffieHellman(p1, 'buffer');
43 const dh4 = crypto.createDiffieHellman(p1, 'buffer');
75 const c = crypto.createDecipheriv('aes-128-ecb', crypto.randomBytes(16), '');
82 const c = crypto
[all...]
H A Dtest-crypto-hmac.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
10 const Hmac = crypto.Hmac;
11 const instance = crypto.Hmac('sha256', 'Node');
17 () => crypto.createHmac(null),
26 () => crypto.createHmac('sha256', 'key').digest({
35 () => crypto.createHmac('sha1', null),
52 ...(typeof key === 'string' ? [] : [crypto.createSecretKey]),
56 const hmac = crypto
[all...]
H A Dtest-crypto-psychic-signatures.js4 common.skip('missing crypto');
8 const crypto = require('crypto');
35 const keyPair = crypto.generateKeyPairSync('ec', {
56 crypto.verify(
66 crypto.verify(
76 crypto.createVerify('sha256')
83 crypto.webcrypto.subtle.importKey(
90 return crypto.webcrypto.subtle.verify(
/third_party/node/test/fixtures/wpt/WebCryptoAPI/
H A Dalgorithm-discards-context.https.window.js40 crypto.subtle.generateKey(algorithm, true, ["encrypt", "decrypt"]);`;
48 crypto.subtle.importKey("raw", new Uint8Array(16), algorithm, true,
56 let key = await crypto.subtle.generateKey(
60 crypto.subtle.encrypt(algorithm, key, new Uint8Array());
68 let key = await crypto.subtle.generateKey(
71 let encrypted = await crypto.subtle.encrypt(algorithm, key, new Uint8Array());
73 crypto.subtle.decrypt(algorithm, key, encrypted);
82 crypto.subtle.digest(algorithm, new Uint8Array());`;
89 let key = await crypto.subtle.generateKey(
93 crypto
[all...]
/third_party/node/src/quic/
H A Dtlscontext.cc93 BaseObjectPtr<crypto::SecureContext> InitializeSecureContext( in InitializeSecureContext()
95 auto context = crypto::SecureContext::Create(env); in InitializeSecureContext()
105 return BaseObjectPtr<crypto::SecureContext>(); in InitializeSecureContext()
135 return BaseObjectPtr<crypto::SecureContext>(); in InitializeSecureContext()
152 return BaseObjectPtr<crypto::SecureContext>(); in InitializeSecureContext()
156 return BaseObjectPtr<crypto::SecureContext>(); in InitializeSecureContext()
162 crypto::ClearErrorOnReturn clear_error_on_return; in InitializeSecureContext()
163 crypto::BIOPointer bio = crypto::NodeBIO::NewFixed(ca.base, ca.len); in InitializeSecureContext()
170 crypto in InitializeSecureContext()
[all...]
/third_party/node/test/sequential/
H A Dtest-crypto-timing-safe-equal.js4 common.skip('missing crypto');
7 const crypto = require('crypto');
11 crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('foo')),
17 crypto.timingSafeEqual(Buffer.from('foo'), Buffer.from('bar')),
23 const buf = crypto.randomBytes(16).buffer;
30 assert.strictEqual(crypto.timingSafeEqual(left, right), true);
47 assert.strictEqual(crypto.timingSafeEqual(a, b), timingSafeEqual);
71 () => crypto.timingSafeEqual(Buffer.from([1, 2, 3]), Buffer.from([1, 2])),
80 () => crypto
[all...]
/third_party/node/benchmark/crypto/
H A Dcreate-keyobject.js4 const crypto = require('crypto');
42 publicKey: crypto.createPublicKey(keyFixtures[keyType].publicKey),
43 privateKey: crypto.createPrivateKey(keyFixtures[keyType].privateKey),
50 fn = crypto.createPublicKey;
54 fn = crypto.createPrivateKey;
59 fn = crypto.createPublicKey;
65 fn = crypto.createPrivateKey;
71 fn = crypto.createPublicKey;
77 fn = crypto
[all...]
H A Doneshot-verify.js4 const crypto = require('crypto');
26 const data = crypto.randomBytes(256);
48 crypto.verify(
67 crypto.verify(
86 crypto.verify(
97 keyObjects ||= pems.map(crypto.createPublicKey);
136 const signature = crypto.sign(digest, data, privateKey);
H A Daes-gcm-throughput.js3 const crypto = require('crypto');
13 const key = crypto.randomBytes(keylen[cipher]);
14 const iv = crypto.randomBytes(12);
26 const alice = crypto.createCipheriv(cipher, key, iv);
31 const bob = crypto.createDecipheriv(cipher, key, iv);
/third_party/decimal.js/test/modules/
H A Dconfig.js24 crypto {boolean|number} {true, false, 1, 0}
44 crypto: false,
54 t(Decimal.crypto === false);
64 //crypto: true, // requires crypto object
74 //t(Decimal.crypto === true); // requires crypto object
273 // crypto
277 T.assertEqual(expected, Decimal.crypto);
280 t(false, {crypto
[all...]
/third_party/node/test/common/
H A Dtls.js1 /* eslint-disable node-core/crypto-check */
4 const crypto = require('crypto');
18 Buffer.concat([this.version, crypto.randomBytes(46)]);
21 this.client_random = crypto.randomBytes(32);
53 const encrypted_pre_primary_secret = crypto.publicEncrypt({
55 padding: crypto.constants.RSA_PKCS1_PADDING,
66 const shasum = crypto.createHash('sha256');
117 const nonce = crypto.randomBytes(8);
119 const bob = crypto
[all...]
/third_party/node/test/fixtures/wpt/WebCryptoAPI/derive_bits_keys/
H A Decdh_keys.js4 var subtle = self.crypto.subtle;
41 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
52 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
64 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
75 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
90 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
101 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
112 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
123 .then(function(key) {return crypto.subtle.exportKey("raw", key);})
134 .then(function(key) {return crypto
[all...]

Completed in 6 milliseconds

12345678910>>...40