Skip to content

Commit 2d6f90d

Browse files
panvanpaun
authored andcommitted
crypto: add ChaCha20-Poly1305 Web Cryptography algorithm
PR-URL: nodejs/node#59365 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 1fbf14c commit 2d6f90d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

include/ncrypto.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ class Cipher final {
380380
static const Cipher AES_128_KW;
381381
static const Cipher AES_192_KW;
382382
static const Cipher AES_256_KW;
383+
static const Cipher CHACHA20_POLY1305;
383384

384385
struct CipherParams {
385386
int padding;

src/ncrypto.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,6 +3087,7 @@ const Cipher Cipher::AES_256_GCM = Cipher::FromNid(NID_aes_256_gcm);
30873087
const Cipher Cipher::AES_128_KW = Cipher::FromNid(NID_id_aes128_wrap);
30883088
const Cipher Cipher::AES_192_KW = Cipher::FromNid(NID_id_aes192_wrap);
30893089
const Cipher Cipher::AES_256_KW = Cipher::FromNid(NID_id_aes256_wrap);
3090+
const Cipher Cipher::CHACHA20_POLY1305 = Cipher::FromNid(NID_chacha20_poly1305);
30903091

30913092
bool Cipher::isGcmMode() const {
30923093
if (!cipher_) return false;

0 commit comments

Comments
 (0)