Return a list of the signature file names (v1 Signature / JAR
        Signature)

        :rtype: List of filenames matching a Signature
772531
def get_signature_names(self):
        
        signature_expr = re.compile(r"^(META-INF/)(.*)(\.RSA|\.EC|\.DSA)$")
        signatures = []

        for i in self.get_files():
            if signature_expr.search(i):
                if "{}.SF".format(i.rsplit(".", 1)[0]) in self.get_files():
                    signatures.append(i)
                else:
                    log.warning("v1 signature file {} missing .SF file - Partial signature!".format(i))

        return signatures
51623
def get_names_and_paths(compiler_output: Dict[str, Any]) -> Dict[str, str]:
    
    return {
        contract_name: make_path_relative(path)
        for path in compiler_output
        for contract_name in compiler_output[path].keys()
    }
381941
def signature(self):
        ''' 
        '''
        return self.name, [str(x.type) for x in self.elems]
248181
def list_sig_ok(self, signature: str):
        
        list_filename = self.get_list_filename(signature)
        if list_filename not in self.name_cache:
            return False
        for _object_name, sig in Cache.iterate_objects(list_filename):
            if not self.get_object_filename(sig):
                return False
        return True
1037142
def cli_verify_jar_signature(argument_list):
    

    usage_message = "jarutil v file.jar trusted_certificate.pem [SF_NAME.SF]"
    if len(argument_list) < 2 or len(argument_list) > 3:
        print(usage_message)
        return 1

    jar_file, certificate, sf_name = (argument_list + [None])[:3]
    try:
        verify(certificate, jar_file, sf_name)

    except VerificationError as error_message:
        print(error_message)
        return 1

    else:
        print("Jar verified.")
        return 0
231567
def namelist(self):
        """"""
        l = []
        for data in self.filelist:
            l.append(data.filename)
        return l
463148
def _GetSignatureScanner(cls, specification_store):
    
    signature_scanner = pysigscan.scanner()
    signature_scanner.set_scan_buffer_size(cls._SCAN_BUFFER_SIZE)

    for format_specification in specification_store.specifications:
      for signature in format_specification.signatures:
        pattern_offset = signature.offset

        if pattern_offset is None:
          signature_flags = pysigscan.signature_flags.NO_OFFSET
        elif pattern_offset < 0:
          pattern_offset *= -1
          signature_flags = pysigscan.signature_flags.RELATIVE_FROM_END
        else:
          signature_flags = pysigscan.signature_flags.RELATIVE_FROM_START

        signature_scanner.add_signature(
            signature.identifier, pattern_offset, signature.pattern,
            signature_flags)

    return signature_scanner
514282
def filenames(self):
        """"""
        return [p.name for p in self.packets if isinstance(p, FileDescriptionPacket)]
403699
def cli_sign_jar(argument_list=None):
    

    usage_message = "jarutil s [OPTIONS] jar_file cert_file " \
                    "key_file key_alias"

    parser = argparse.ArgumentParser(usage=usage_message)

    parser.add_argument("jar_file", type=str,
                        help="JAR file to sign")
    parser.add_argument("cert_file", type=str,
                        help="Certificate file (PEM format)")
    parser.add_argument("key_file", type=str,
                        help="Private key file (PEM format)")
    parser.add_argument("key_alias", type=str,
                        help="JAR \"key alias\" to use")

    parser.add_argument("-d", "--digest", action="store", default="SHA-256",
                        # TODO: factor to a constant
                        help="Digest algorithm used for signing")

    parser.add_argument("-c", "--chain", action="append",
                        dest="extra_certs", default=[],
                        help="Additional certificates to embed into the"
                        " signature (PEM format). More than one \"-c\" option"
                        " can be provided.")

    parser.add_argument("-o", "--output", action="store", default=None,
                        help="Filename to put signed jar. If not provided, the"
                        " signature is added to the original jar file.")

    args = parser.parse_args(argument_list)

    try:
        sign(args.jar_file, args.cert_file, args.key_file, args.key_alias,
             args.extra_certs, args.digest, args.output)

    except CannotFindKeyTypeError:
        print("Cannot determine private key type in %s" % args.key_file)
        return 1

    except MissingManifestError:
        print("Manifest missing in jar file %s" % args.jar_file)
        return 2

    return 0
510159
def getSignalHeaders(self):
        
        signalHeader = []
        for chn in np.arange(self.signals_in_file):
            signalHeader.append(self.getSignalHeader(chn))
        return signalHeader
635513
def _get_repr_list(self):
        
        spacing = ' '*2
        text = ['']
        text.append("%sfile: %s" % (spacing, self._filename))
        text.append("%sextension: %d" % (spacing, self._info['hdunum']-1))
        text.append(
            "%stype: %s" % (spacing, _hdu_type_map[self._info['hdutype']]))

        extname = self.get_extname()
        if extname != "":
            text.append("%sextname: %s" % (spacing, extname))
        extver = self.get_extver()
        if extver != 0:
            text.append("%sextver: %s" % (spacing, extver))

        return text, spacing
621752
def calculate_hashes(self):
        
        hashers = []
        if not self.mardata.signatures:
            return []

        for s in self.mardata.signatures.sigs:
            h = make_hasher(s.algorithm_id)
            hashers.append((s.algorithm_id, h))

        for block in get_signature_data(self.fileobj, self.mardata.signatures.filesize):
            [h.update(block) for (_, h) in hashers]

        return [(algo_id, h.finalize()) for (algo_id, h) in hashers]
1171699
def filename(self):
        
        if self.buildver:
            buildver = '-' + self.buildver
        else:
            buildver = ''
        pyver = '.'.join(self.pyver)
        abi = '.'.join(self.abi)
        arch = '.'.join(self.arch)
        # replace - with _ as a local version separator
        version = self.version.replace('-', '_')
        return '%s-%s%s-%s-%s-%s.whl' % (self.name, version, buildver,
                                         pyver, abi, arch)
838357
def params(self):
        
        return [{"name": p_name, "type": p_type.__name__}
                for (p_name, p_type) in self.signature.parameter_types]
3115
def signature_str(self):
        
        name, parameters, returnVars = self.signature
        return name+'('+','.join(parameters)+') returns('+','.join(returnVars)+')'
474166
def pathNames(self) -> [str]:
        

        return [f.pathName for f in list(self._files.values())]
1050289
def get_assembly_names():
    

    return [
        n.replace(".json.gz", "")
        for n in pkg_resources.resource_listdir(__name__, _assy_dir)
        if n.endswith(".json.gz")
    ]