Get cipher key size in bits from cipher suite name Returns: - 256 for AES-256 and ChaCha20 - 128 for AES-128 - 0 for unknown ciphers
(cipher_name: &str)
| 2279 | /// - 128 for AES-128 |
| 2280 | /// - 0 for unknown ciphers |
| 2281 | pub(super) fn get_cipher_key_bits(cipher_name: &str) -> i32 { |
| 2282 | if cipher_name.contains("256") || cipher_name.contains("CHACHA20") { |
| 2283 | 256 |
| 2284 | } else if cipher_name.contains("128") { |
| 2285 | 128 |
| 2286 | } else { |
| 2287 | 0 |
| 2288 | } |
| 2289 | } |
| 2290 | |
| 2291 | /// Get encryption algorithm description from cipher name |
| 2292 | /// |
no test coverage detected