Class KeyUtils
- java.lang.Object
-
- com.atlassian.bamboo.security.trustedapplications.KeyUtils
-
public final class KeyUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KeyUtils.InvalidKey
static class
KeyUtils.InvalidPrivateKey
If there are problems creating a key, one of these will be returned instead.static class
KeyUtils.InvalidPublicKey
If there are problems creating a key, one of these will be returned instead.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull KeyPair
decodeKeyPair(@NotNull com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, @NotNull String publicKeyStr, @NotNull String privateKeyStr)
Decodes a key pair from two Base 64 encoded representations.static PrivateKey
decodePrivateKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
static PublicKey
decodePublicKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
static String
encode(Key key)
static KeyPair
generateNewKeyPair(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider)
-
-
-
Method Detail
-
generateNewKeyPair
public static KeyPair generateNewKeyPair(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider)
-
decodePrivateKey
public static PrivateKey decodePrivateKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
-
decodePublicKey
public static PublicKey decodePublicKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
-
decodeKeyPair
@NotNull public static @NotNull KeyPair decodeKeyPair(@NotNull @NotNull com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, @NotNull @NotNull String publicKeyStr, @NotNull @NotNull String privateKeyStr)
Decodes a key pair from two Base 64 encoded representations. Throws IllegalArgumentException on error.
-
-