Class KeyReader
java.lang.Object
de.captaingoldfish.scim.sdk.client.keys.KeyReader
author: Pascal Knueppel
created at: 02.03.2017
will provide support methods to translate keys to java objects
created at: 02.03.2017
will provide support methods to translate keys to java objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic PrivateKeyreadPrivateRSAKey(byte[] privateKey) will read a private rsa key from a given byte-array of aPKCS8EncodedKeySpecstatic X509CertificatereadX509Certificate(byte[] certificateBytes) should read a X509 certificate from the given byte-arraystatic X509CertificatereadX509Certificate(InputStream certificateStream) should read a X509 certificate from the given byte-array
-
Method Details
-
readPrivateRSAKey
will read a private rsa key from a given byte-array of aPKCS8EncodedKeySpec- Parameters:
privateKey- the bytes of the rsa key- Returns:
- the private-key interface implementation of rsa
-
readX509Certificate
should read a X509 certificate from the given byte-array- Parameters:
certificateBytes- the bytes of the certificate- Returns:
- the X509 certificate
- Throws:
CertificateCreationException- if the certificate could not be created from the given data.
-
readX509Certificate
should read a X509 certificate from the given byte-array- Parameters:
certificateStream- the certificate inputstream- Returns:
- the X509 certificate
- Throws:
CertificateCreationException- if the certificate could not be created from the given data.
-