def HMAC_SHA256_128(key, msg):
 assert (len(key) >= const.SHARED_SECRET_LENGTH)
 h = Crypto.Hash.HMAC.new(key, msg, Crypto.Hash.SHA256)
 return h.digest()[:16]

def HMAC_SHA256_128 ( key , msg ) : assert ( len ( key ) >= const . SHARED_SECRET_LENGTH ) h = Crypto . Hash . HMAC . new ( key , msg , Crypto . Hash . SHA256 ) return h . digest ( ) [ : 16 ]
return the hmac-sha256-128 of the given msg authenticated by key .