[PYTHON-CRYPTO] SIG thoughts.

Michael Ströder michael at STROEDER.COM
Sat Feb 10 18:37:03 CET 2001


Andrew Kuchling wrote:
>
> Would find_alg() return an instance or a module, though?

The question is class or instance.
I would prefer to return an instance.

> JCE has an interesting idea, using objects instead of simple strings
> for keys; that allows having methods to do things like check the
> parity of a DES key.  That might well be too cumbersome, though.

I would like to define classes for every object handled in this API.
IMHO it's not too cumbersome. E.g. an implementation of a cipher
algorithm will have to deal with a key object only during
initialization of the cipher instance and is free to solely handle
the key string internally (for speed).

But with classes for each object we can use assert statements for
type checking.

Ciao, Michael.





More information about the python-crypto mailing list