@@ -20,7 +20,8 @@ def _parse_fullname(fullname, *, strict=False):
2020        return  None , None 
2121    assert  isinstance (fullname , str ), fullname 
2222    assert  fullname .count ("." ) >=  1 , fullname 
23-     return  fullname .rsplit ("." , maxsplit = 1 )
23+     module_name , member_name  =  fullname .rsplit ("." , maxsplit = 1 )
24+     return  module_name , member_name 
2425
2526
2627def  _import_module (module_name , * , strict = False ):
@@ -482,7 +483,7 @@ def _iter_hash_func_info(excluded):
482483assert  _HMACINFO_DATABASE .keys () ==  CANONICAL_DIGEST_NAMES 
483484
484485
485- def  get_hmac_info_item (name ):
486+ def  get_hmac_func_info (name ):
486487    info  =  _HMACINFO_DATABASE [name ]
487488    assert  isinstance (info , _HashInfoItem ), info 
488489    return  info 
@@ -646,7 +647,7 @@ def _openssl_hash(digestname, /, **kwargs):
646647    except  ImportError  as  exc :
647648        raise  SkipNoHash (fullname , "openssl" ) from  exc 
648649    try :
649-         constructor  =  getattr (_hashlib , method_name ,  None )
650+         constructor  =  getattr (_hashlib , method_name )
650651    except  AttributeError  as  exc :
651652        raise  SkipNoHash (fullname , "openssl" ) from  exc 
652653    try :
@@ -1017,7 +1018,7 @@ def dummy(data=b'', *, usedforsecurity=True, string=b''):
10171018
10181019def  _block_builtin_hmac_constructor (name ):
10191020    """Block explicit HACL* HMAC constructors.""" 
1020-     info  =  get_hmac_info_item (name )
1021+     info  =  get_hmac_func_info (name )
10211022    assert  info .module_name  is  None  or  info .module_name  ==  "_hmac" , info 
10221023    if  (wrapped  :=  info .import_member ()) is  None :
10231024        # function shouldn't exist for this implementation 
0 commit comments