A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-September/017547.html below:

[Python-Dev] Parametrized codecs

[Python-Dev] Parametrized codecs [Python-Dev] Parametrized codecsGordon McMillan gmcm@hypernet.com
Tue, 18 Sep 2001 16:31:31 -0400
Andrew wrote:

> Are there any codecs that can take parameters at initialization
> time? If not, how about supporting them?  Here's a motivating
> example:
> 
> import codecs
> f = codecs.open('output', 'wb', encoding='DES',  # arguments to
> open()
>                 key = '...', mode = DES.ECB)
> f.write('This will be encrypted\n')
> f.close()

RC4, maybe. But I think you're asking for trouble in trying to 
pretend a block-mode cipher is a stream.

- Gordon



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4