So the annoyance is that since we don't have a default hash_cls (which I
think is a bad idea), it ends up making msg a required argument as well.


On Mon, Oct 28, 2013 at 5:55 AM, Donald Stufft <notifications@github.com>wrote:

> In cryptography/primitives/hmac.py:
>
> > +# Unless required by applicable law or agreed to in writing, software
> > +# distributed under the License is distributed on an "AS IS" BASIS,
> > +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > +# implied.
> > +# See the License for the specific language governing permissions and
> > +# limitations under the License.
> > +
> > +from __future__ import absolute_import, division, print_function
> > +
> > +import binascii
> > +
> > +import six
> > +
> > +
> > +class HMAC(object):
> > +    def __init__(self, key, hash_cls, data=None, ctx=None, backend=None):
>
> I think it'd be nice to mimic the built in hmac module here with a method
> signature of hmac(key[, msg[, digestmod]]). It would be exactly the same
> since they use a new function, but at least you'd be able to
> interchangeably use this class and that function.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/157/files#r7246551>
> .
>



-- 
"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