On Monday, August 3, 2015 at 1:47:32 AM UTC-4, Jeffrey Walton wrote:
>
> The patch below (1) documents the interface, including when the underlying 
> array is uninitialized versus set to 0; (2) adds move semantics; (3) makes 
> its members private; (4) adds asserts for some sanity checks in Debug 
> builds; (5) guards calls to memset and memcpy for NULL pointers and 
> 0-sizes; (6) prefers initialization over assignment; and (7) switches to 
> numeric_limits::max() for sizes.
>
> Regarding (3), two classes, Salsa and Sosemanuk, reached in. They are now 
> using SecBlock::data() to access the block. That will be a separate 
> proposal.
>
> Regarding (5), its undefined behavior to call memset or memcpy (and 
> friends) with a NULL pointer. The current behavior of unchecked calls 
> lights up an assert in misc.h.
>
> Regarding (6), "initialization over assignment" provides stronger 
> exception safety. Here's what a typical change looks like ...
>

Committed at 
https://github.com/weidai11/cryptopp/commit/572506de3d00f1280c89b1168384178a988c4486.
 
Review by DB.

Jeff 

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to