But it's OK for the application to call CreatePutSpace() and then call
Put() using a pre-existing pointer? I.e., in order to take advantage of
CreatePutSpace(), the application doesn't _have_ to manually write into
the returned buffer, for instance if this is unpractical because data
already exists at another memory location?


-----Original Message-----
From: Wei Dai
Sent: Friday, February 28, 2003 18:28
To: [EMAIL PROTECTED]
Subject: Re: CreatePutSpace() in Crypto++ 5


On Fri, Feb 28, 2003 at 06:09:32PM +0100, denis bider wrote:
> What is the role of the byte pointer returned by CreatePutSpace() in
> this? Can the application write to it directly? If so, can it then
call
> Put() and specify that same pointer as input?

The role is to help avoid doing extra memory allocations. Yes. Yes.
I've changed the documentation to the following:

                //! request space which can be written into by the
caller, 
and then used as input to Put()
                /*! \param size is requested size 
(as a hint) for input, and size of the returned space for output */
                /*! \note The purpose of this method is to help avoid 
doing extra memory allocations. */


Reply via email to