miniproto_native::crypto::aes_256_ctr_crypt
Provenance
Section titled “Provenance”- Rust visibility:
restricted - Source:
rust/miniproto/src/crypto.rs - Python exposure:
miniproto._native.aes_256_ctr_crypt(confirmed from adjacent PyO3 attributes)
Signature
Section titled “Signature”fn aes_256_ctr_crypt(py: _, data: _, key: _, iv: _) -> _Arguments
Section titled “Arguments”py: The acquired GIL token used to detach large counter-mode work.data: Bytes to encrypt or decrypt.key: The 32-byte AES-256 key.iv: The 16-byte initial counter block.
aes_256_ctr_crypt
Section titled “aes_256_ctr_crypt”fn aes_256_ctr_crypt(py: Python<'_>, data: std::borrow::Cow<'_, [u8]>, key: std::borrow::Cow<'_, [u8]>, iv: std::borrow::Cow<'_, [u8]>) -> PyResult<Vec<u8>>Defined in rust/miniproto/src/crypto.rs:365-375
Applies Python aes_256_ctr_crypt to data using AES-CTR keystream XOR.
The same routine encrypts and decrypts; it validates the 32-byte key and 16-byte counter IV, and releases the GIL for large data.
Arguments
Section titled “Arguments”py: The acquired GIL token used to detach large counter-mode work.data: Bytes to encrypt or decrypt.key: The 32-byte AES-256 key.iv: The 16-byte initial counter block.