PKCS8EncodedKeySpec() — netty Function Reference
Architecture documentation for the PKCS8EncodedKeySpec() function in SslContext.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 7a6f77f2_589f_b1aa_70bf_a3beacdaea81["PKCS8EncodedKeySpec()"] ec56e535_0508_8846_8172_a704185d370e["SslContext"] 7a6f77f2_589f_b1aa_70bf_a3beacdaea81 -->|defined in| ec56e535_0508_8846_8172_a704185d370e style 7a6f77f2_589f_b1aa_70bf_a3beacdaea81 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslContext.java lines 1102–1121
@Deprecated
protected static PKCS8EncodedKeySpec generateKeySpec(char[] password, byte[] key)
throws IOException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException,
InvalidKeyException, InvalidAlgorithmParameterException {
if (password == null) {
return new PKCS8EncodedKeySpec(key);
}
EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = new EncryptedPrivateKeyInfo(key);
String pbeAlgorithm = getPBEAlgorithm(encryptedPrivateKeyInfo);
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(pbeAlgorithm);
PBEKeySpec pbeKeySpec = new PBEKeySpec(password);
SecretKey pbeKey = keyFactory.generateSecret(pbeKeySpec);
Cipher cipher = Cipher.getInstance(pbeAlgorithm);
cipher.init(Cipher.DECRYPT_MODE, pbeKey, encryptedPrivateKeyInfo.getAlgParameters());
return encryptedPrivateKeyInfo.getKeySpec(cipher);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does PKCS8EncodedKeySpec() do?
PKCS8EncodedKeySpec() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslContext.java.
Where is PKCS8EncodedKeySpec() defined?
PKCS8EncodedKeySpec() is defined in handler/src/main/java/io/netty/handler/ssl/SslContext.java at line 1102.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free