[PYTHON-CRYPTO] PEP-272 (API for Secret-Key Encryption Algorithms)
Janusz A. Urbanowicz
alex at BOFH.TORUN.PL
Fri Dec 14 13:14:06 CET 2001
Andy Dustman wrote/napisał[a]/schrieb:
> Should we have a general API rule that only encrypt() or decrypt() may
> be called on a cipher instance, and if the other is called then a) you
> get an exception or b) undefined results?
I have though on this issue and the result was as following: any given
copher is a subclass of class Cipher which has three public methods - the
constructor, encrypt() and decrypt(). The key is supplied to __init__() when
instantiating the class and you later use the object to enrypt with the
key. Seemed pretty straightforward to me.
Alex
--
C _-=-_ H| Janusz A. Urbanowicz | ALEX3-RIPE | SF-F Framling | | *
; (_O : +-------------------------------------------------------------+ --+~|
! &~) ? | Płynąć chcę na Wschód, za Suez, gdzie jest dobrem każde zło | l_|/
A ~-=-~ O| Gdzie przykazań brak dziesięciu, a pić można aż po dno; | |
More information about the python-crypto
mailing list