WYCLIFF001/secbuf — reverse-engineered prompt

Reverse engineered prompt

Build me a Rust crate for secure, fast buffer handling, aimed at things like network servers, protocol parsing, and other places that may hold secrets in memory. I want normal read and write buffers, circular buffers for stream style data, and reusable buffer pools so allocations stay cheap. The big requirement is that buffer contents get securely wiped when they are dropped, and there should also be manual ways to wipe or wipe and free memory right away.

Please include connection scoped buffer management so one connection can own read, write, and stream buffers, plus limits, idle cleanup, shrinking, and simple memory usage diagnostics. It should feel easy to use, with helpers for bytes, integers, and SSH style length prefixed strings. Add examples, tests, and a small benchmark suite so I can see it working and trust the safety and performance claims.

Keep the API clean and ergonomic, and make pooled buffers return automatically when they go out of scope. If you need details, look up current Rust docs online.

Want more depth? Deep Reverse