Class KeyReader

java.lang.Object
de.captaingoldfish.scim.sdk.client.keys.KeyReader

public class KeyReader extends Object
author: Pascal Knueppel
created at: 02.03.2017

will provide support methods to translate keys to java objects
  • Method Details

    • readPrivateRSAKey

      public static PrivateKey readPrivateRSAKey(byte[] privateKey)
      will read a private rsa key from a given byte-array of a PKCS8EncodedKeySpec
      Parameters:
      privateKey - the bytes of the rsa key
      Returns:
      the private-key interface implementation of rsa
    • readX509Certificate

      public static X509Certificate readX509Certificate(byte[] certificateBytes)
      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

      public static X509Certificate readX509Certificate(InputStream certificateStream)
      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.