Class BouncyCastleProviderUtils

java.lang.Object
com.atlassian.bamboo.crypto.BouncyCastleProviderUtils

public class BouncyCastleProviderUtils extends Object
  • Field Details

    • JCA_PEM_KEY_CONVERTER

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

    • 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
    • toJavaKeyPair

      public static KeyPair toJavaKeyPair(@NotNull @NotNull Object keyPair, @Nullable @Nullable String passPhrase) throws IOException
      Throws:
      IOException
    • 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