Class KeyConverter

java.lang.Object
de.adorsys.sts.common.converter.KeyConverter

public class KeyConverter extends Object
  • Constructor Details

    • KeyConverter

      public KeyConverter()
  • Method Details

    • toPrivateOrSecret

      public static Key toPrivateOrSecret(com.nimbusds.jose.jwk.JWK jwk)
      Converts the specified of JSON Web Keys (JWK) it's standard Java class representation. Asymmetric RSA and EC key pairs are converted to PublicKey and PrivateKey (if specified) objects. secret JWKs are converted to SecretKey objects.
      Parameters:
      jwk - jwk
      Returns:
      private key, secret key or nul;
    • toPrivateOrSecret

      public static Key toPrivateOrSecret(com.nimbusds.jose.jwk.JWK jwk, String alg)
      Converts the specified of JSON Web Keys (JWK) it's standard Java class representation. Asymmetric RSA and EC key pairs are converted to PublicKey and PrivateKey (if specified) objects. secret JWKs are converted to SecretKey objects.
      Parameters:
      jwk - jwk
      Returns:
      private key, secret key or nul;
    • toPublic

      public static Key toPublic(com.nimbusds.jose.jwk.JWK jwk)
    • exportPrivateKeys

      public static com.nimbusds.jose.jwk.JWKSet exportPrivateKeys(KeyStore keyStore, char[] keypass)
    • getJWSAlgo

      public static com.nimbusds.jose.JWSAlgorithm getJWSAlgo(KeyAndJwk randomKey)
    • findSigner

      public static com.nimbusds.jose.JWSSigner findSigner(KeyAndJwk randomKey) throws com.nimbusds.jose.JOSEException
      Throws:
      com.nimbusds.jose.JOSEException