Load keystore from file.
180944
public static KeyStore load(String path, char[] password) {
        try {
            return load(new FileInputStream(path), password);
        } catch (FileNotFoundException e) {
            throw new TrustManagerLoadFailedException(e);
        }
    }
13172
def load(file)
      if File.exist? file
        symbolize_keys(YAML.load_file(File.expand_path('.', file)))
      else
        {}
      end
    end
520074
def load_pkcs12(self, key):
        
        self.x509 = key.get_certificate().to_cryptography()
        self.public_key = key.get_certificate().to_cryptography().public_key()
        self.private_key = key.get_privatekey().to_cryptography_key()
1135109
def load(self, name, location='local'):
        """"""
        path = self._get_path(name, location, file_ext='.json')
        if op.exists(path):
            return _load_json(path)
        path = self._get_path(name, location, file_ext='.pkl')
        if op.exists(path):
            return _load_pickle(path)
        logger.debug("The file `%s` doesn't exist.", path)
        return {}
1177062
def from_file(cls, file_path, compressed=False, encoded=False):
        """"""
        file_id = '.'.join(path.basename(file_path).split('.')[:-1])
        file_format = file_path.split('.')[-1]
        content = cls(file_id, file_format, compressed, encoded)
        content.file_exists = True
        content._location = path.dirname(file_path)
        return content
1109395
def _load_from_file(self, filename):
        """"""
        if filename in self.fdata:
            return self.fdata[filename]
        else:
            filepath = find_in_tarball(self.tarloc, filename)
            return read_from_tarball(self.tarloc, filepath)
1350551
def load(cls, filename, store_password, try_decrypt_keys=True):
        
        with open(filename, 'rb') as file:
            input_bytes = file.read()
            ret = cls.loads(input_bytes,
                            store_password,
                            try_decrypt_keys=try_decrypt_keys)
        return ret
1140437
def keybundle_from_local_file(filename, typ, usage):
    
    usage = harmonize_usage(usage)

    if typ.lower() == "jwks":
        kb = KeyBundle(source=filename, fileformat="jwks", keyusage=usage)
    elif typ.lower() == 'der':
        kb = KeyBundle(source=filename, fileformat="der", keyusage=usage)
    else:
        raise UnknownKeyType("Unsupported key type")

    return kb
1211367
def from_file(self, fname):
        """"""
        f = open(fname, "rb")
        data = f.read()
        self.update(data)
        f.close()
314195
private static void loadSignCert(String certFilePath, String certPwd) {
		KeyStore keyStore = null;
		try {
			keyStore = getKeyInfo(certFilePath, certPwd, "PKCS12");
			keyStoreMap.put(certFilePath, keyStore);
			LogUtil.writeLog("LoadRsaCert Successful");
		} catch (IOException e) {
			LogUtil.writeErrorLog("LoadRsaCert Error", e);
		}
	}
809627
public static KeyStore readKeyStore(String type, InputStream in, char[] password) {
		KeyStore keyStore = null;
		try {
			keyStore = KeyStore.getInstance(type);
			keyStore.load(in, password);
		} catch (Exception e) {
			throw new CryptoException(e);
		}
		return keyStore;
	}
1316958
def load_keypair(keypair_file):
    '''
    '''
    from Crypto.PublicKey import RSA

    # Load key
    with open(keypair_file, 'rb') as filey:
        key = RSA.import_key(filey.read())

    return quote_plus(key.publickey().exportKey().decode('utf-8'))
1060029
def load(path):
  """"""
  proto = _parse_saved_model(path)
  _merge_assets_key_collection(proto, path)
  handler = SavedModelHandler()
  handler._proto = proto  # pylint: disable=protected-access
  return handler
1306701
def load(filename, loader=None, implicit_tuple=True, env={}, schema=None):
  """"""
  with open(filename, 'r') as f:
    return loads(f.read(),
                 filename=filename,
                 loader=loader,
                 implicit_tuple=implicit_tuple,
                 env=env,
                 schema=schema)
297142
public static KeyStore loadKeyStore(String keystoreType, @Nullable String keystorePassword, InputStream is)
            throws KeyStoreException {
        try {
            KeyStore keystore = KeyStore.getInstance(keystoreType);
            keystore.load(is, keystorePassword != null ? keystorePassword.toCharArray() : null);
            return keystore;
        } catch (IOException x) {
            throw new KeyStoreException(x);
        } catch (GeneralSecurityException x) {
            throw new KeyStoreException(x);
        } finally {
            try {
                is.close();
            } catch (IOException x) {
                // Ignored.
            }
        }
    }
53766
private RSAPrivateKey loadPrivateKeyFromPEMFile(String filename) {
        try {
            String publicKeyFile = FileReader.readFileFromClassPathOrPath(filename);
            byte[] publicKeyBytes = DatatypeConverter.parseBase64Binary(publicKeyFile.replace("-----BEGIN RSA PRIVATE KEY-----", "").replace("-----END RSA PRIVATE KEY-----", ""));
            return (RSAPrivateKey) KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(publicKeyBytes));
        } catch (Exception e) {
            throw new RuntimeException("Exception reading private key from PEM file", e);
        }
    }
659114
def load_pem_private_key(data, password):
    """"""
    key = _serialization.load_pem_private_key(
        data, password, _backends.default_backend())
    return key