MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_cipher_encryption_desc

Function get_cipher_encryption_desc

crates/stdlib/src/ssl/compat.rs:2294–2304  ·  view source on GitHub ↗

Get encryption algorithm description from cipher name Returns human-readable encryption description for OpenSSL compatibility

(cipher_name: &str)

Source from the content-addressed store, hash-verified

2292///
2293/// Returns human-readable encryption description for OpenSSL compatibility
2294pub(super) fn get_cipher_encryption_desc(cipher_name: &str) -> &'static str {
2295 if cipher_name.contains("AES256") {
2296 "AESGCM(256)"
2297 } else if cipher_name.contains("AES128") {
2298 "AESGCM(128)"
2299 } else if cipher_name.contains("CHACHA20") {
2300 "CHACHA20-POLY1305(256)"
2301 } else {
2302 "Unknown"
2303 }
2304}
2305
2306/// Normalize rustls cipher suite name to IANA standard format
2307///

Callers 1

get_ciphersMethod · 0.85

Calls 1

containsMethod · 0.45

Tested by

no test coverage detected