[Cryptography-dev] "Streaming" APIs

Donald Stufft donald at stufft.io
Wed Sep 18 01:18:04 CEST 2013


On Sep 14, 2013, at 4:05 PM, Donald Stufft <donald at stufft.io> wrote:

> If we created an encryption context object we could do
> 
> BlockCipher.encryptor() = EncryptionContext()  # Has the .update() + .finalize() api
> BlockCipher.iter_encrypti() = Iter based API, uses BlockCipher.encryptor() internally
> BlockCipher.encrypt() = solid string only based API, uses iter_encrypt() internally
> 
> I had thought about this but I ended up not bothering because the mental overhead
> of giving users an EncryptionContext didn't see worth it over just passing a list.
> 
> 

So how bout dem iter apis.


-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/cryptography-dev/attachments/20130917/886bf7e4/attachment.sig>


More information about the Cryptography-dev mailing list