/third_party/node/test/parallel/ |
H A D | test-crypto-authenticated.js | 142 const decrypt = crypto.createDecipheriv(test.algo, 146 decrypt.setAuthTag(Buffer.from(test.tag, 'hex')); 148 decrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions); 152 let msg = decrypt.update(test.ct, 'hex', outputEncoding); 154 msg += decrypt.final(outputEncoding); 158 assert.throws(function() { decrypt.final('hex'); }, errMessages.auth); 187 const decrypt = crypto.createDecipher(test.algo, test.password, options); 188 decrypt.setAuthTag(Buffer.from(test.tag, 'hex')); 190 decrypt.setAAD(Buffer.from(test.aad, 'hex'), aadOptions); 191 let msg = decrypt [all...] |
H A D | test-crypto-private-decrypt-gh32240.js | 31 function decrypt(key) { function 36 decrypt(pkey); 37 assert.throws(() => decrypt(pkeyEncrypted), common.hasOpenSSL3 ? 41 decrypt(pkey); // Should not throw.
|
H A D | test-crypto-padding.js | 71 const decrypt = crypto.createDecipheriv(CIPHER_NAME, KEY_PLAIN, IV_PLAIN); 72 decrypt.setAutoPadding(pad); 73 let plain = decrypt.update(encd, 'hex'); 74 plain += decrypt.final('latin1'); 113 message: 'error:1C800064:Provider routines::bad decrypt', 114 reason: 'bad decrypt', 118 'bad decrypt', 119 reason: 'bad decrypt',
|
H A D | test-crypto-padding-aes256.js | 40 function decrypt(val, pad) { function 51 let decrypted = decrypt(encrypted, false); 59 decrypted = decrypt(encrypted, true);
|
/third_party/ffmpeg/libavutil/ |
H A D | xtea.c | 59 int decrypt, uint8_t *iv) in xtea_crypt_ecb() 72 if (decrypt) { in xtea_crypt_ecb() 179 int decrypt, uint8_t *iv) in xtea_le_crypt_ecb() 187 if (decrypt) { in xtea_le_crypt_ecb() 215 uint8_t *iv, int decrypt, in xtea_crypt() 220 if (decrypt) { in xtea_crypt() 222 crypt(ctx, dst, src, decrypt, iv); in xtea_crypt() 232 crypt(ctx, dst, dst, decrypt, NULL); in xtea_crypt() 235 crypt(ctx, dst, src, decrypt, NULL); in xtea_crypt() 244 uint8_t *iv, int decrypt) in av_xtea_crypt() 58 xtea_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int decrypt, uint8_t *iv) xtea_crypt_ecb() argument 178 xtea_le_crypt_ecb(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int decrypt, uint8_t *iv) xtea_le_crypt_ecb() argument 214 xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt, void (*crypt)(AVXTEA *, uint8_t *, const uint8_t *, int, uint8_t *)) xtea_crypt() argument 243 av_xtea_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) av_xtea_crypt() argument 249 av_xtea_le_crypt(AVXTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) av_xtea_le_crypt() argument [all...] |
H A D | tea.c | 53 int decrypt, uint8_t *iv) in tea_crypt_ecb() 66 if (decrypt) { in tea_crypt_ecb() 96 uint8_t *iv, int decrypt) in av_tea_crypt() 100 if (decrypt) { in av_tea_crypt() 102 tea_crypt_ecb(ctx, dst, src, decrypt, iv); in av_tea_crypt() 112 tea_crypt_ecb(ctx, dst, dst, decrypt, NULL); in av_tea_crypt() 115 tea_crypt_ecb(ctx, dst, src, decrypt, NULL); in av_tea_crypt() 52 tea_crypt_ecb(AVTEA *ctx, uint8_t *dst, const uint8_t *src, int decrypt, uint8_t *iv) tea_crypt_ecb() argument 95 av_tea_crypt(AVTEA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) av_tea_crypt() argument
|
H A D | aes.h | 46 * @param decrypt 0 for encryption, 1 for decryption 48 int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt); 51 * Encrypt or decrypt a buffer using a previously initialized context. 56 * @param decrypt 0 for encryption, 1 for decryption 58 void av_aes_crypt(struct AVAES *a, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
|
H A D | des.h | 47 * @param decrypt 0 for encryption/CBC-MAC, 1 for decryption 50 int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt); 60 * @param decrypt 0 for encryption, 1 for decryption 62 void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
|
H A D | cast5.h | 56 * Encrypt or decrypt a buffer using a previously initialized context, ECB mode only 62 * @param decrypt 0 for encryption, 1 for decryption 64 void av_cast5_crypt(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, int decrypt); 67 * Encrypt or decrypt a buffer using a previously initialized context 74 * @param decrypt 0 for encryption, 1 for decryption 76 void av_cast5_crypt2(struct AVCAST5 *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
|
H A D | blowfish.h | 55 * Encrypt or decrypt a buffer using a previously initialized context. 60 * @param decrypt 0 for encryption, 1 for decryption 63 int decrypt); 66 * Encrypt or decrypt a buffer using a previously initialized context. 73 * @param decrypt 0 for encryption, 1 for decryption 76 int count, uint8_t *iv, int decrypt);
|
H A D | rc4.h | 46 * @param decrypt 0 for encryption, 1 for decryption, currently has no effect 49 int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt); 58 * @param decrypt 0 for encryption, 1 for decryption, not (yet) used 60 void av_rc4_crypt(struct AVRC4 *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt);
|
H A D | des.c | 256 static uint64_t des_encdec(uint64_t in, uint64_t K[16], int decrypt) in des_encdec() argument 260 decrypt = decrypt ? 15 : 0; in des_encdec() 265 f_res = f_func(in, K[decrypt ^ i]); in des_encdec() 280 int av_des_init(AVDES *d, const uint8_t *key, int key_bits, av_unused int decrypt) { in av_des_init() argument 293 int count, uint8_t *iv, int decrypt, int mac) in av_des_crypt_mac() 299 if (decrypt) { in av_des_crypt_mac() 325 int count, uint8_t *iv, int decrypt) in av_des_crypt() 327 av_des_crypt_mac(d, dst, src, count, iv, decrypt, 0); in av_des_crypt() 292 av_des_crypt_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt, int mac) av_des_crypt_mac() argument 324 av_des_crypt(AVDES *d, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) av_des_crypt() argument
|
H A D | xtea.h | 63 * Encrypt or decrypt a buffer using a previously initialized context, 71 * @param decrypt 0 for encryption, 1 for decryption 74 int count, uint8_t *iv, int decrypt); 77 * Encrypt or decrypt a buffer using a previously initialized context, 85 * @param decrypt 0 for encryption, 1 for decryption 88 int count, uint8_t *iv, int decrypt);
|
H A D | rc4.c | 34 int av_rc4_init(AVRC4 *r, const uint8_t *key, int key_bits, int decrypt) { in av_rc4_init() argument 55 void av_rc4_crypt(AVRC4 *r, uint8_t *dst, const uint8_t *src, int count, uint8_t *iv, int decrypt) { in av_rc4_crypt() argument
|
/third_party/mbedtls/programs/psa/ |
H A D | crypto_examples.c | 174 uint8_t decrypt[block_size]; in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() local 195 decrypt, sizeof(decrypt), &output_len); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 198 status = memcmp(input, decrypt, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() 222 encrypt[input_size + block_size], decrypt[input_size + block_size]; in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() local 243 decrypt, sizeof(decrypt), &output_len); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() 246 status = memcmp(input, decrypt, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() 269 decrypt[input_size]; in cipher_example_encrypt_decrypt_aes_ctr_multi() local 290 decrypt, sizeo in cipher_example_encrypt_decrypt_aes_ctr_multi() [all...] |
/third_party/ffmpeg/libavutil/tests/ |
H A D | des.c | 49 static int run_test(int cbc, int decrypt) in run_test() argument 52 int delay = cbc && !decrypt ? 2 : 1; in run_test() 57 av_des_init(&d, cbc_key, 192, decrypt); in run_test() 58 av_des_crypt(&d, large_buffer[delay], large_buffer[0], 10000, cbc ? tmp : NULL, decrypt); in run_test() 61 if (decrypt) in run_test() 66 if (decrypt) in run_test()
|
/third_party/rust/crates/rust-openssl/openssl/src/ |
H A D | cms.rs | 72 /// decrypt the data in `self`. 74 pub fn decrypt<T>(&self, pkey: &PKeyRef<T>, cert: &X509) -> Result<Vec<u8>, ErrorStack> in decrypt() functions 97 /// decrypt the data in `self` without validating the recipient certificate. 101 // FIXME merge into decrypt 321 // decrypt cms message using private key cert (DER) in cms_encrypt_decrypt() 324 let decrypt = in cms_encrypt_decrypt() 327 let decrypt_with_cert_check = decrypt in cms_encrypt_decrypt() 328 .decrypt( in cms_encrypt_decrypt() 332 .expect("failed to decrypt cms"); in cms_encrypt_decrypt() 336 let decrypt_without_cert_check = decrypt in cms_encrypt_decrypt() [all...] |
/third_party/node/deps/openssl/openssl/crypto/cms/ |
H A D | cms_rsa.c | 182 int ossl_cms_rsa_envelope(CMS_RecipientInfo *ri, int decrypt) in ossl_cms_rsa_envelope() argument 184 assert(decrypt == 0 || decrypt == 1); in ossl_cms_rsa_envelope() 186 if (decrypt == 1) in ossl_cms_rsa_envelope() 189 if (decrypt == 0) in ossl_cms_rsa_envelope()
|
H A D | cms_dh.c | 331 int ossl_cms_dh_envelope(CMS_RecipientInfo *ri, int decrypt) in ossl_cms_dh_envelope() argument 333 assert(decrypt == 0 || decrypt == 1); in ossl_cms_dh_envelope() 335 if (decrypt == 1) in ossl_cms_dh_envelope() 338 if (decrypt == 0) in ossl_cms_dh_envelope()
|
/third_party/openssl/crypto/cms/ |
H A D | cms_rsa.c | 176 int ossl_cms_rsa_envelope(CMS_RecipientInfo *ri, int decrypt) in ossl_cms_rsa_envelope() argument 178 assert(decrypt == 0 || decrypt == 1); in ossl_cms_rsa_envelope() 180 if (decrypt == 1) in ossl_cms_rsa_envelope() 183 if (decrypt == 0) in ossl_cms_rsa_envelope()
|
H A D | cms_dh.c | 331 int ossl_cms_dh_envelope(CMS_RecipientInfo *ri, int decrypt) in ossl_cms_dh_envelope() argument 333 assert(decrypt == 0 || decrypt == 1); in ossl_cms_dh_envelope() 335 if (decrypt == 1) in ossl_cms_dh_envelope() 338 if (decrypt == 0) in ossl_cms_dh_envelope()
|
/third_party/node/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/ |
H A D | aes.js | 17 var promise = importVectorKey(vector, ["encrypt", "decrypt"]) 41 var promise = importVectorKey(vector, ["encrypt", "decrypt"]) 66 var promise = importVectorKey(vector, ["encrypt", "decrypt"]) 69 return subtle.decrypt(vector.algorithm, vector.key, vector.result) 73 assert_unreached("decrypt error for test " + vector.name + ": " + err.message); 90 var promise = importVectorKey(vector, ["encrypt", "decrypt"]) 93 var operation = subtle.decrypt(vector.algorithm, vector.key, ciphertext) 97 assert_unreached("decrypt error for test " + vector.name + ": " + err.message); 119 var promise = importVectorKey(badVector, ["decrypt"]) 152 var promise = importVectorKey(vector, ["encrypt", "decrypt"]) [all...] |
H A D | rsa.js | 16 var promise = importVectorKeys(vector, ["encrypt"], ["decrypt"]) 24 return subtle.decrypt(vector.algorithm, vector.privateKey, vector.ciphertext) 45 var promise = importVectorKeys(vector, ["encrypt"], ["decrypt"]) 54 var operation = subtle.decrypt(vector.algorithm, vector.privateKey, ciphertext) 75 // Check for failures due to using publicKey to decrypt. 77 var promise = importVectorKeys(vector, ["encrypt"], ["decrypt"]) 80 return subtle.decrypt(vector.algorithm, vector.publicKey, vector.ciphertext) 82 assert_unreached("Should have thrown error for using publicKey to decrypt in " + vector.name + ": " + err.message + "'"); 86 }, vector.name + " using publicKey to decrypt"); 93 }, "importVectorKeys step: " + vector.name + " using publicKey to decrypt"); [all...] |
/third_party/node/deps/openssl/openssl/crypto/modes/ |
H A D | ocb128.c | 131 block128_f encrypt, block128_f decrypt, in CRYPTO_ocb128_new() 138 ret = CRYPTO_ocb128_init(octx, keyenc, keydec, encrypt, decrypt, in CRYPTO_ocb128_new() 152 block128_f encrypt, block128_f decrypt, in CRYPTO_ocb128_init() 169 ctx->decrypt = decrypt; in CRYPTO_ocb128_init() 468 ctx->decrypt(tmp.c, tmp.c, ctx->keydec); in CRYPTO_ocb128_decrypt() 130 CRYPTO_ocb128_new(void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream) CRYPTO_ocb128_new() argument 151 CRYPTO_ocb128_init(OCB128_CONTEXT *ctx, void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream) CRYPTO_ocb128_init() argument
|
/third_party/openssl/crypto/modes/ |
H A D | ocb128.c | 131 block128_f encrypt, block128_f decrypt, in CRYPTO_ocb128_new() 138 ret = CRYPTO_ocb128_init(octx, keyenc, keydec, encrypt, decrypt, in CRYPTO_ocb128_new() 152 block128_f encrypt, block128_f decrypt, in CRYPTO_ocb128_init() 169 ctx->decrypt = decrypt; in CRYPTO_ocb128_init() 468 ctx->decrypt(tmp.c, tmp.c, ctx->keydec); in CRYPTO_ocb128_decrypt() 130 CRYPTO_ocb128_new(void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream) CRYPTO_ocb128_new() argument 151 CRYPTO_ocb128_init(OCB128_CONTEXT *ctx, void *keyenc, void *keydec, block128_f encrypt, block128_f decrypt, ocb128_f stream) CRYPTO_ocb128_init() argument
|