amkCrypto/mxCrypto on Win32 with Visual C++

Alexander Gavrilov agavrilov at home.com
Tue Jul 3 02:08:15 CEST 2001


I didn't try to install this package, but...
Even this construct is perfectly legal according to C++ standard, VC++
doesn't support it. I can suggest to replace these two lines:

     static int const blocksize = 1;
     static int const keysize = 0;

with the following:

enum
{
     blocksize = 1,
     keysize = 0
};

It should work with VC++.

--
Alexander Gavrilov
Brainbench MVP for C++
http://www.brainbench.com

"Steve Holden" <sholden at holdenweb.com> wrote in message
news:HS507.15883$Lk6.1149673 at e420r-atl2.usenetserver.com...
> I'm trying to get the amkCrypto (modified mxCrypto) package working under
> Win32, but Visual C++ is barfing about the declaration (and concurrent
> initialization) of public member variables.
>
> For example, mxCrypto.h includes the following declaration:
>
> class StreamCipher
> {
>  protected:
>     int mode;
>
>  public:
>     static int const blocksize = 1;
>     static int const keysize = 0;
>
>     StreamCipher(PyStringObject *v, int cipher_mode);
>     ~StreamCipher();
>     PyObject *encrypt(PyStringObject *v);
>     PyObject *decrypt(PyStringObject *v);
>     int getmode(void) { return mode; };
> };
>
> The compiler says that the public member variables (blocksize and keysize)
> cannot be intialized in the header file. But clearly this code works under
> some compilers...
>
> Has anyone sucessfully installed this code on Windows? Nothing on Google
to
> suggest previous problems.
>
> Thanks in advance
>  Steve
> --
> http://www.holdenweb.com/
>
>
>
>





More information about the Python-list mailing list