INNER CODE UNIT · Python
search_files
crocs-muni/JCAlgTest · AlgTest_Process/cplc.py:14
def search_files(folder):
for root, dirs, files in os.walk(folder):
yield from [os.path.join(root, x) for x in files]
def path_leaf(path):
head, tail = ntpath.split(path)
return tail or ntpath.basename(head)
def get_fab_name(icfab):
"""
Returns human-readable name of fabricator based on provided ICFabricator id
@param icfab: string realization of 2 bytes ICFabricator (in hexadecimal, e.g., '4090')
@returns human-readable fabricator string
"""
if icfab.find('0003') != -1: return 'Renesas' # https://www.cryptsoft.com/fips140/vendors/140sp485.pdf
if icfab.find('0005') != -1: return 'Infineon' # https://csrc.nist.gov/csrc/media/projects/cryptographic-module-validation-program/documents/security-policies/140sp2327.pdf