public class KeyUtils extends Object
Constructor and Description |
---|
KeyUtils() |
Modifier and Type | Method and Description |
---|---|
static PrivateKey |
decodePrivateKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider,
String keyStr)
Decode a Base64-encoded String representing a
PrivateKey . |
static PublicKey |
decodePublicKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider,
String keyStr)
Decode a Base64-encoded String representing a
PublicKey . |
static String |
encode(Key key)
Encode the given key into a Base64 encoded string representation.
|
public static String encode(Key key)
key
- a PrivateKey
or PublicKey
public static PrivateKey decodePrivateKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
PrivateKey
.keyStr
- the String representation of a private keyPrivateKey
IllegalStateException
- if we can't decode the keypublic static PublicKey decodePublicKey(com.atlassian.security.auth.trustedapps.EncryptionProvider encryptionProvider, String keyStr)
PublicKey
.keyStr
- the String representation of a public keyPublicKey
IllegalStateException
- if we can't decode the keyCopyright © 2016 Atlassian. All rights reserved.