#NEWLINE# def HMAC_SHA256_128( key , msg ) : #NEWLINE# #INDENT# "\n    Return the HMAC-SHA256-128 of the given `msg' authenticated by `key'.\n    " #NEWLINE# assert ( len ( key ) >= const . SHARED_SECRET_LENGTH ) #NEWLINE# h = Crypto . Hash . HMAC . new ( key , msg , Crypto . Hash . SHA256 ) #NEWLINE# return h . digest ( ) [ : 16 ]