อาจเป็นคำถามโง่ๆ แต่ฉันหาคำอธิบายจาก Google ไม่ได้ มีการตั้งค่าใน server.xml
ไฟล์ของ Websphere Liberty 8.5
<keyStore id="sampleJKSKeyStore"
location="MyKeyStoreFile.jks"
type="JKS" password="myPassword" />
ฉันสามารถทำอะไรกับที่เก็บคีย์นี้ได้บ้าง? ฉันสามารถยกตัวอย่างโดยทางโปรแกรม บันทึกลงใน และ โหลดจาก PrivateKey
/ PublicKey
ที่ฉันสร้างโดยใช้โค้ดต่อไปนี้:
final KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(1024);
final KeyPair key = keyGen.generateKeyPair();
final PrivateKey privateKey1=key.getPrivate();
final PublicKey publickey1=key.getPublic();
ขอบคุณล่วงหน้า!