If you mean your result variable, then no :). Actually I just noticed that it is bool in first case, it supposed to be std::string or byte queue or char* buffer. Something that can take copy of contents of your message variable.
Here you just write first byte or few (depending on size of bool) of the message into boolean. That is what you are doing: bool result = *((bool*)message.data()); This is probably not what you want. :) On Dec 18, 9:54 am, Charlie <[email protected]> wrote: > But the result of the signature and the verification is the same in > both cases, isn't it? > > On 18 dic, 17:29, Eugene Zolenko <[email protected]> wrote: > > > > > First way will throw exception if verification failed, second returns > > false. > > > It is possible to suppress exception I think and get an error code > > with some combination of filters and flags. Need to use redirector to > > pass in verifier filter without giving up ownership and then check > > result of verification. > > > Anyway, first one also copies message without signature into output > > buffer. > > > Use first when you get signed message that you need to process with > > other filters as well (encryption, encoding, etc). > > > Use second if you have the message already at destination buffer and > > you need only to verify it. -- 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.
