# In HMAC-MD5 Implementation, why “i_key_pad” and “o_key_pad” if They Are Public and Constant? [duplicate]

Please Consider: English is My Second Language

This Wikipedia article on HMACs shows a part of a HMAC-MD5 implementation making use of i_key_pad and o_key_pad:

# [...]

def hmac_md5(key, msg):
if len(key) > blocksize:
key = md5(key).digest()
key = key + bytearray(blocksize - len(key))

• Note that in the code you quote o_key_padand i_key_pad are not public and constant. They are the "padded" versions of the key. – otus Aug 31 '15 at 5:16