Help for this page

Select Code to Download


  1. or download this
    import hmac
    import hashlib
    ...
    i = 0
    string = A+chr(0x00)+B+chr(i)
    print "STRING: ",binascii.b2a_hex(string);
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $digest = hmac_sha1($hd,$pmk);
    print unpack("H*",$digest)."\n"; # according to docs: $digest = hmac_s
    +ha1($data, $key);
     # does not come out as 9287f887faade9257f5a806309a2bac8956fcbec like 
    +hmac_sha1 from Python ?