File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,9 @@ class Cipher final {
380
380
static const Cipher AES_128_KW;
381
381
static const Cipher AES_192_KW;
382
382
static const Cipher AES_256_KW;
383
+ static const Cipher AES_128_OCB;
384
+ static const Cipher AES_192_OCB;
385
+ static const Cipher AES_256_OCB;
383
386
static const Cipher CHACHA20_POLY1305;
384
387
385
388
struct CipherParams {
@@ -755,6 +758,7 @@ class CipherCtxPointer final {
755
758
int getNid () const ;
756
759
757
760
bool isGcmMode () const ;
761
+ bool isOcbMode () const ;
758
762
bool isCcmMode () const ;
759
763
bool isWrapMode () const ;
760
764
bool isChaCha20Poly1305 () const ;
Original file line number Diff line number Diff line change @@ -3201,6 +3201,9 @@ const Cipher Cipher::AES_256_GCM = Cipher::FromNid(NID_aes_256_gcm);
3201
3201
const Cipher Cipher::AES_128_KW = Cipher::FromNid (NID_id_aes128_wrap);
3202
3202
const Cipher Cipher::AES_192_KW = Cipher::FromNid (NID_id_aes192_wrap);
3203
3203
const Cipher Cipher::AES_256_KW = Cipher::FromNid (NID_id_aes256_wrap);
3204
+ const Cipher Cipher::AES_128_OCB = Cipher::FromNid (NID_aes_128_ocb);
3205
+ const Cipher Cipher::AES_192_OCB = Cipher::FromNid (NID_aes_192_ocb);
3206
+ const Cipher Cipher::AES_256_OCB = Cipher::FromNid (NID_aes_256_ocb);
3204
3207
const Cipher Cipher::CHACHA20_POLY1305 = Cipher::FromNid (NID_chacha20_poly1305);
3205
3208
3206
3209
bool Cipher::isGcmMode () const {
@@ -3476,6 +3479,11 @@ bool CipherCtxPointer::isGcmMode() const {
3476
3479
return getMode () == EVP_CIPH_GCM_MODE;
3477
3480
}
3478
3481
3482
+ bool CipherCtxPointer::isOcbMode () const {
3483
+ if (!ctx_) return false ;
3484
+ return getMode () == EVP_CIPH_OCB_MODE;
3485
+ }
3486
+
3479
3487
bool CipherCtxPointer::isCcmMode () const {
3480
3488
if (!ctx_) return false ;
3481
3489
return getMode () == EVP_CIPH_CCM_MODE;
You can’t perform that action at this time.
0 commit comments