alamb commented on issue #7373:
URL: https://github.com/apache/arrow-rs/issues/7373#issuecomment-2780661344

   This seems reasonable to me, though the memory safety concern is likely less 
a problem with rust
   
   You can probably make something like this:
   ```rust
   struct SecureKey {
     inner: Vec<u8>
   }
   
   impl Drop for SecureKey { 
   ...
   // reset memory here
   }
   
   /// allow Secure key to be coerced to &[u8]
   impl AsRef<[u8]> for SecureKey {
     fn as_ref(&self) -> &[u8] {
       &inner
     }
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to