Hi Gary,
A SecByteBlock is a type def of SecBlock<byte> from secblock.h. I do
recall that a SecByteBlock is missing from the online documentation,
but SecBlock is present. See
http://cryptopp.com/docs/ref/class_sec_block.html.
Line 262 of secblock.h is of interest:
iterator begin() {return m_ptr;}
SecBlock also provides some operator void* (casts) to get at the m_ptr member.
Jeff
On 2/2/09, Gary <[email protected]> wrote:
>
> Hello
> Thank you Mr. Beresford.
> Your advice was so helpfull!
>
> I changed the code based on your suggestion,
> 1-Include the "files.h"
> 2-change Hashmodule to HashTransformation
> as below:
>
> [ SNIP ]
>
> void DumpHash_SingleStep(
> CryptoPP::HashTransformation& hash,
> char const* szModuleName,
> std::string const& strData)
> {
> using namespace std;
> using namespace CryptoPP;
>
> // Cannot use std::string for buffer;
> // its internal storage might not be contiguous
> SecByteBlock sbbDigest(hash.DigestSize());
>
> hash.CalculateDigest(
> sbbDigest.Begin(),
> (byte const*) strData.data(),
> strData.size());
>
> [ SNIP ]
>
> Most of errors are removed!
> But still there are 6 error as below:
>
>
> ------ Build started: Project: cryptopp(hashmodule), Configuration:
> Debug Win32 ------
> Compiling...
> 1.cpp
> d:\cryptopp(hashmodule)\1.cpp(22) : error C2039: 'Begin' : is not a
> member of
>
> 'CryptoPP::SecBlock<T>'
> with
> [
> T=byte
> ]
>
> [ SNIP ]
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---