Package com.atlassian.bamboo.crypto
Class BouncyCastleProviderUtils
- java.lang.Object
-
- com.atlassian.bamboo.crypto.BouncyCastleProviderUtils
-
public class BouncyCastleProviderUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter
JCA_PEM_KEY_CONVERTER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull Path
decodeKeyAndWriteToFile(File sshKeyFile, @NotNull String sskKey, @Nullable String passphrase)
static @NotNull org.bouncycastle.crypto.params.AsymmetricKeyParameter
getKeyParameters(PrivateKey privateKey)
CreatesAsymmetricKeyParameter
from aPrivateKey
static @NotNull Provider
getProvider()
static String
getProviderName()
static KeyPair
toJavaKeyPair(@NotNull Object keyPair, @Nullable String passPhrase)
static KeyPair
toJavaKeyPair(org.bouncycastle.openssl.PEMKeyPair keyPair)
-
-
-
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
-
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)
CreatesAsymmetricKeyParameter
from aPrivateKey
-
decodeKeyAndWriteToFile
@NotNull public static @NotNull Path decodeKeyAndWriteToFile(File sshKeyFile, @NotNull @NotNull String sskKey, @Nullable @Nullable String passphrase) throws IOException
- Throws:
IOException
-
-