miniproto_native::crypto::aes_256_ctr_crypt
Provenance
Section titled “Provenance”- Crate:
miniproto_native - 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.
cargo-docs-md rendering
Section titled “cargo-docs-md rendering”aes_256_ctr_crypt
Section titled “aes_256_ctr_crypt”fn aes_256_ctr_crypt(py: Python<'_>, data: Vec<u8>, key: Vec<u8>, iv: Vec<u8>) -> PyResult<Vec<u8>>Defined in rust/miniproto/src/crypto.rs:361-371
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.