+1 on prefering private attributes unless there's a specific use case.


On Wed, Jan 29, 2014 at 11:00 AM, David Reid <notifications@github.com>wrote:

> In cryptography/hazmat/primitives/kdf/pbkdf2.py:
>
> > +from cryptography.exceptions import (
> > +    InvalidKey, UnsupportedAlgorithm, AlreadyFinalized
> > +)
> > +from cryptography.hazmat.primitives import constant_time, interfaces
> > +
> > +
> > +@utils.register_interface(interfaces.
> KeyDerivationFunction)
> > +class PBKDF2HMAC(object):
> > +    def __init__(self, algorithm, length, salt, iterations, backend):
> > +        if not backend.pbkdf2_hmac_supported(algorithm):
> > +            raise UnsupportedAlgorithm(
> > +                "{0} is not supported for PBKDF2 by this backend".format(
> > +                    algorithm.name)
> > +            )
> > +        self._used = False
> > +        self.algorithm = algorithm
>
> This isn't public on the interface, nor is it public on the HKDF
> implementation. What's the rationale/use-case for it being public?
>
> Same question for iterations below.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/520/files#r9279051>
> .
>



-- 
"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