⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 keystorefileutility.java

📁 Examples showing use of PKCS #12 and the KeyStore API
💻 JAVA
字号:
package chapter8;

import java.io.FileOutputStream;
import java.security.KeyStore;

/**
 * Create some keystore files in the current directory.
 */
public class KeyStoreFileUtility
{
    public static void main(
        String[]    args)
        throws Exception
    {
        char[]   password = "storePassword".toCharArray();

        // create and save a JKS store
        KeyStore store = JKSStoreExample.createKeyStore();
        
        store.store(new FileOutputStream("keystore.jks"), password);

        // create and save a PKCS #12 store
        store = PKCS12StoreExample.createKeyStore();
        
        store.store(new FileOutputStream("keystore.p12"), password);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -