Class RsaKeyGenerator

java.lang.Object
de.bund.bva.isyfact.security.test.RsaKeyGenerator

public class RsaKeyGenerator extends Object
Class to generate RSA key pairs. It is use by the EmbeddedOidcProviderStub to generate key pairs if they are not explicitly provided. It can be called via the main(String[]) method to create key pairs for a static configuration.
  • Constructor Details

    • RsaKeyGenerator

      public RsaKeyGenerator()
  • Method Details

    • getKeyPair

      public KeyPair getKeyPair()
    • getPublicKey

      public PublicKey getPublicKey()
    • getPrivateKey

      public PrivateKey getPrivateKey()
    • encodePublicKey

      public static String encodePublicKey(PublicKey key)
    • decodePublicKey

      public static PublicKey decodePublicKey(String encodedKey)
    • encodePrivateKey

      public static String encodePrivateKey(PrivateKey key)
    • decodePrivateKey

      public static PrivateKey decodePrivateKey(String encodedKey)
    • decodeKeyPair

      public static KeyPair decodeKeyPair(String encodedPublicKey, String encodedPrivateKey)
    • main

      public static void main(String[] args)
      Star method to create a public/private RSA key pair.
      Parameters:
      args - command line arguments (ignored)