Java Key Create getKeyStore(String path, String passwd, String storeType)

Here you can find the source of getKeyStore(String path, String passwd, String storeType)

Description

get Key Store

License

Apache License

Declaration

public static KeyStore getKeyStore(String path, String passwd, String storeType) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.FileInputStream;
import java.io.InputStream;

import java.security.KeyStore;

public class Main {
    public static KeyStore getKeyStore(String path, String passwd, String storeType) {
        try {//www .  j  a va  2 s.  c  om
            InputStream fis = new FileInputStream(path);
            KeyStore store = KeyStore.getInstance(storeType);
            store.load(fis, passwd.toCharArray());
            return store;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

Related

  1. getKeyStore(String filename, String password)
  2. getKeyStore(String keyStoreName, String password)
  3. getKeyStore(String keystorePath, String keystorePassword)
  4. getKeyStore(String keyStorePath, String password)
  5. getKeyStore(String ksType, String file, String ksPassword)
  6. getKeyStoreFromFile(String filePath, char[] password)
  7. getKeyStoreFromFile(String keystoreName, String password, String home)
  8. getKeyStores()
  9. getKeyString(Key key)