Should Cipher's __init__ have `mode=None` and then raise an error itself if
the algorithm doesn't have some interface?

Alex


On Fri, Nov 8, 2013 at 2:54 PM, David Reid <notifications@github.com> wrote:

> In docs/hazmat/primitives/symmetric-encryption.rst:
>
> > @@ -149,6 +149,16 @@ Weak Ciphers
> >      :param bytes key: The secret key, 32-448 bits in length (in increments of
> >                        8).  This must be kept secret.
> >
> > +.. class:: ARC4(key)
> > +
> > +    ARC4 (Alleged RC4) is a stream cipher with serious weaknesses in its
> > +    initial stream output. Its use is strongly discouraged. ARC4 does not use
> > +    mode constructions.
> > +
>
> We should have an example here showing how to use a modeless cipher (since
> this is the only one so far this seems like a good place to do it?)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/214/files#r7541475>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084