MaxPlainTextLength' : is not a member of 'CryptoPP::PK_FinalTemplate<BASE>

View: New views
2 Messages — Rating Filter:   Alert me  

MaxPlainTextLength' : is not a member of 'CryptoPP::PK_FinalTemplate<BASE>

by Simon Heffer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I've just upgraded from an old version of Crypto++ to 5.5.2 ('cos I'm
doing a 64bit XP port). I;m getting this a lot so obviously that
member is no longer used. Is there an equivalent or will the class
handle any length now?

Sample code with problem...
        StringSource pubString(mystuff,true,new HexDecoder);
        RSAES_OAEP_SHA_Encryptor pub(pubString);

        if (strlen(message) > pub.MaxPlainTextLength())
        {
                cerr << "message too long \n";
                abort();
        }

Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---


Re: MaxPlainTextLength' : is not a member of 'CryptoPP::PK_FinalTemplate<BASE>

by Geoff Beier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I think I fixed that one recently around here. You must be moving from
a very old version. I believe you want
FixedMaxPlaintextLength();

HTH,

Geoff

On Thu, Oct 2, 2008 at 06:47, Simon Heffer <simon_heffer@...> wrote:

>
> Hi,
>
> I've just upgraded from an old version of Crypto++ to 5.5.2 ('cos I'm
> doing a 64bit XP port). I;m getting this a lot so obviously that
> member is no longer used. Is there an equivalent or will the class
> handle any length now?
>
> Sample code with problem...
>        StringSource pubString(mystuff,true,new HexDecoder);
>        RSAES_OAEP_SHA_Encryptor pub(pubString);
>
>        if (strlen(message) > pub.MaxPlainTextLength())
>        {
>                cerr << "message too long \n";
>                abort();
>        }
>
> Simon
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-users-unsubscribe@....
More information about Crypto++ and this group is available at http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price!