Class BouncyCastleProviderUtils


  • public class BouncyCastleProviderUtils
    extends Object
    • Field Detail

      • JCA_PEM_KEY_CONVERTER

        public static final org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter JCA_PEM_KEY_CONVERTER
    • Method Detail

      • getProviderName

        public static String getProviderName()
      • getProvider

        @NotNull
        public static @NotNull Provider getProvider()
      • toJavaKeyPair

        public static KeyPair toJavaKeyPair​(org.bouncycastle.openssl.PEMKeyPair keyPair)
                                     throws org.bouncycastle.openssl.PEMException
        Throws:
        org.bouncycastle.openssl.PEMException
      • getKeyParameters

        @NotNull
        public static @NotNull org.bouncycastle.crypto.params.AsymmetricKeyParameter getKeyParameters​(PrivateKey privateKey)
        Creates AsymmetricKeyParameter from a PrivateKey
      • decodeKeyAndWriteToFile

        @NotNull
        public static @NotNull Path decodeKeyAndWriteToFile​(File sshKeyFile,
                                                            @NotNull
                                                            @NotNull String sskKey,
                                                            @Nullable
                                                            @Nullable String passphrase)
                                                     throws IOException
        Throws:
        IOException