Skip to content

Commit 293342d

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 694a273 commit 293342d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/ncrypto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ class Cipher final {
321321
static const Cipher AES_128_KW;
322322
static const Cipher AES_192_KW;
323323
static const Cipher AES_256_KW;
324+
static const Cipher CHACHA20_POLY1305;
324325
static const Cipher AES_128_OCB;
325326
static const Cipher AES_192_OCB;
326327
static const Cipher AES_256_OCB;
327-
static const Cipher CHACHA20_POLY1305;
328328

329329
struct CipherParams {
330330
int padding;

src/ncrypto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3172,10 +3172,10 @@ const Cipher Cipher::AES_256_GCM = Cipher::FromNid(NID_aes_256_gcm);
31723172
const Cipher Cipher::AES_128_KW = Cipher::FromNid(NID_id_aes128_wrap);
31733173
const Cipher Cipher::AES_192_KW = Cipher::FromNid(NID_id_aes192_wrap);
31743174
const Cipher Cipher::AES_256_KW = Cipher::FromNid(NID_id_aes256_wrap);
3175+
const Cipher Cipher::CHACHA20_POLY1305 = Cipher::FromNid(NID_chacha20_poly1305);
31753176
const Cipher Cipher::AES_128_OCB = Cipher::FromNid(NID_aes_128_ocb);
31763177
const Cipher Cipher::AES_192_OCB = Cipher::FromNid(NID_aes_192_ocb);
31773178
const Cipher Cipher::AES_256_OCB = Cipher::FromNid(NID_aes_256_ocb);
3178-
const Cipher Cipher::CHACHA20_POLY1305 = Cipher::FromNid(NID_chacha20_poly1305);
31793179

31803180
bool Cipher::isGcmMode() const {
31813181
if (!cipher_) return false;

0 commit comments

Comments
 (0)