Skip to content

Commit f6161b2

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 db137bb commit f6161b2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ncrypto.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2927,6 +2927,7 @@ const Cipher Cipher::AES_256_GCM = Cipher::FromNid(NID_aes_256_gcm);
29272927
const Cipher Cipher::AES_128_KW = Cipher::FromNid(NID_id_aes128_wrap);
29282928
const Cipher Cipher::AES_192_KW = Cipher::FromNid(NID_id_aes192_wrap);
29292929
const Cipher Cipher::AES_256_KW = Cipher::FromNid(NID_id_aes256_wrap);
2930+
const Cipher Cipher::CHACHA20_POLY1305 = Cipher::FromNid(NID_chacha20_poly1305);
29302931

29312932
bool Cipher::isGcmMode() const {
29322933
if (!cipher_) return false;

ncrypto.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ class Cipher final {
373373
static const Cipher AES_128_KW;
374374
static const Cipher AES_192_KW;
375375
static const Cipher AES_256_KW;
376+
static const Cipher CHACHA20_POLY1305;
376377

377378
struct CipherParams {
378379
int padding;

0 commit comments

Comments
 (0)