1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:27:35 +00:00

LibTLS: Generate cipher variants based on the cipher

This is better than using the AEAD flag :^)
This commit is contained in:
DexesTTP 2021-05-18 23:26:23 +02:00 committed by Andreas Kling
parent 2e9a4bb95c
commit 9bb823a6ab
3 changed files with 42 additions and 8 deletions

View file

@ -43,6 +43,7 @@ enum class SignatureAlgorithm : u8 {
};
enum class CipherAlgorithm {
Invalid,
AES_128_CBC,
AES_128_GCM,
AES_128_CCM,
@ -62,8 +63,9 @@ constexpr size_t cipher_key_size(CipherAlgorithm algorithm)
case CipherAlgorithm::AES_256_CBC:
case CipherAlgorithm::AES_256_GCM:
return 256;
case CipherAlgorithm::Invalid:
default:
return 128;
return 0;
}
}