Re: hmac module and key format

2011-02-21 Thread Peter Pearson
On Mon, 21 Feb 2011 02:27:36 -0800 (PST), Stuart Longland wrote: [snip] > Before I worried about that though, I needed to have some kind of > understanding as to how the hmac module was used. "Arbitrary string", > sounds to me like I give it something akin to a passphrase, and that > is hashed(?)

Re: hmac module and key format

2011-02-21 Thread Stuart Longland
On Feb 21, 4:59 am, Peter Pearson wrote: > On Sun, 20 Feb 2011 04:01:20 -0800, Paul Rubin > wrote: > > Stuart Longland writes: > >> What format does hmac require the key to be in? > > > It's an arbitrary string.   > > >     I have a key in hexadecimal, do I give it the hex?  Do I decode that >

Re: hmac module and key format

2011-02-20 Thread Peter Pearson
On Sun, 20 Feb 2011 04:01:20 -0800, Paul Rubin wrote: > Stuart Longland writes: >> What format does hmac require the key to be in? > > It's an arbitrary string. > > I have a key in hexadecimal, do I give it the hex? Do I decode that > to binary and give it that? > > Probably yes. Do

Re: hmac module and key format

2011-02-20 Thread Paul Rubin
Stuart Longland writes: > What format does hmac require the key to be in? It's an arbitrary string. I have a key in hexadecimal, do I give it the hex? Do I decode that to binary and give it that? Probably yes. Do you have test vectors? See if they work. -- http://mail.python.org