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

Method cipher

crates/stdlib/src/ssl.rs:3793–3810  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

3791
3792 #[pymethod]
3793 fn cipher(&self) -> Option<(String, String, i32)> {
3794 // Extract cipher suite, releasing lock quickly
3795 let suite = {
3796 let conn_guard = self.connection.lock();
3797 conn_guard.as_ref()?.negotiated_cipher_suite()?
3798 };
3799
3800 // Extract cipher information outside the lock
3801 let cipher_info = extract_cipher_info(&suite);
3802
3803 // Note: returns a 3-tuple (name, protocol_version, bits)
3804 // The 'description' field is part of get_ciphers() output, not cipher()
3805 Some((
3806 cipher_info.name,
3807 cipher_info.protocol.to_string(),
3808 cipher_info.bits,
3809 ))
3810 }
3811
3812 #[pymethod]
3813 fn version(&self) -> Option<String> {

Callers

nothing calls this directly

Calls 6

extract_cipher_infoFunction · 0.85
to_stringMethod · 0.80
SomeClass · 0.50
lockMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected