awnumar / memguard

Secure software enclave for storage of sensitive information in memory.
Apache License 2.0
2.5k stars 123 forks source link

Why is there no `Size` method? #41

Closed shaleh closed 6 years ago

shaleh commented 6 years ago

My use case is allocating a buffer and then copying chunks into it using CopyAt. But it is hard to implement an append operation external to the object since the user does not know where the end of the buffer lies.

The underlying container.buffer has the value needed. We just need to expose it.

awnumar commented 6 years ago

There is one implemented in #38.

In the meantime, a simple len(b.Buffer()) should work fine.

shaleh commented 6 years ago

Thank you.