Re: help tranlating perl expressions

2006-09-28 Thread David Bear
Fredrik Lundh wrote: > David Bear wrote: > > > I am trying to translate some perl code to python and I need some > > advice on making fixed sized strings. > > looks like you're reimplementing HMAC; there's no need to do that in > Python, really, since it's part of the standard library: > >

Re: help tranlating perl expressions

2006-09-28 Thread Fredrik Lundh
David Bear wrote: > I am trying to translate some perl code to python and I need some > advice on making fixed sized strings. looks like you're reimplementing HMAC; there's no need to do that in Python, really, since it's part of the standard library: http://docs.python.org/lib/module-hm

Re: help tranlating perl expressions

2006-09-28 Thread \"Erik Johnson\" wellkeeper dot
"David Bear" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > my $klen = length($key); > my $blen = 64; > my $ipad = chr(0x36)x$blen; > my $opad = chr(0x5c)x$blen; > > I don't know if I ever seen any way in python of created a fixed size > string. Can anyone show me how to implem