Attemps to read the contents of an unencrypted PrivateKey file.
Attemps to read the contents of an unencrypted PrivateKey file.
InvalidKeySpecException
if the file cannot be loaded as an
RSA, DSA, or EC PrivateKey.
InvalidPemFormatException
if the file is not a PEM format
file.
This method will attempt to load the key first as an RSA key, then as a DSA key, and then as an EC (Elliptic Curve) key.
A representation of a PrivateKey that is stored in a file in Pkcs8 PEM format.
-----BEGIN PRIVATE KEY----- base64encodedbytes -----END PRIVATE KEY-----