Class Pem
java.lang.Object
software.amazon.awssdk.services.cloudfront.internal.auth.Pem
- 
Method SummaryModifier and TypeMethodDescriptionA lower level API used to returns all PEM objects that can be read off from the input stream of a PEM file.static PrivateKeyReturns the first private key that is found from the input stream of a PEM file.static PublicKeyReturns the first public key that is found from the input stream of a PEM file.
- 
Method Details- 
readPrivateKeyReturns the first private key that is found from the input stream of a PEM file.- Throws:
- InvalidKeySpecException- if failed to convert the DER bytes into a private key.
- IllegalArgumentException- if no private key is found.
- IOException
 
- 
readPublicKeyReturns the first public key that is found from the input stream of a PEM file.- Throws:
- InvalidKeySpecException- if failed to convert the DER bytes into a public key.
- IllegalArgumentException- if no public key is found.
- IOException
 
- 
readPemObjectsA lower level API used to returns all PEM objects that can be read off from the input stream of a PEM file.This method can be useful if more than one PEM object of different types are embedded in the same PEM file. - Throws:
- IOException
 
 
-