Class PrivateKey
java.lang.Object
com.codename1.security.Key
com.codename1.security.PrivateKey
A private key -- paired with a PublicKey to form a key pair. Carries the
algorithm name ("RSA" or "EC") and the encoded key bytes.
For interop with PEM files (-----BEGIN PRIVATE KEY-----) feed the
PKCS#8 DER bytes to fromPkcs8(String, byte[]).
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrivateKeyWraps a PKCS#8 DER blob.static PrivateKeyrsa(byte[] pkcs8Der) Convenience: build an RSAPrivateKeyfrom afromPkcs8(String, byte[])PKCS#8 blob.Methods inherited from class Key
getAlgorithm, getEncoded, getFormat
-
Method Details
-
fromPkcs8
Wraps a PKCS#8 DER blob. This is the format produced byopenssl pkcs8 -topk8 -nocrypt. -
rsa
Convenience: build an RSAPrivateKeyfrom afromPkcs8(String, byte[])PKCS#8 blob.
-