google/zerocopy

Remove `Ref` constructors which zero bytes?

Closed this issue · 0 comments

These constructors were added to make it easy to zero the contents of a buffer before further use with the goal of avoiding data leaks (e.g. when a buffer is used repeatedly to store multiple packets). These APIs are very cumbersome to maintain, as they effectively duplicate our API surface. They are also of limited utility, since a user can very easily zero the buffer manually before or after calling the constructor.