com.atlassian.bamboo.utils
Class SshKeysProvider
java.lang.Object
com.atlassian.bamboo.utils.SshKeysProvider
public class SshKeysProvider
- extends java.lang.Object
Utility class for generation openssh compatible key pair
Generated keys are RSA keys. The key strength is currently hardcoded to 2048 bits
Method Summary |
Pair<java.lang.String,java.lang.String> |
getRsaOpenSshKeyPair(java.lang.String userComment)
Provides freshly generated 2048-bit RSA key pair. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SshKeysProvider
public SshKeysProvider()
throws java.security.NoSuchProviderException,
java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchProviderException
java.security.NoSuchAlgorithmException
getRsaOpenSshKeyPair
public Pair<java.lang.String,java.lang.String> getRsaOpenSshKeyPair(java.lang.String userComment)
throws java.security.spec.InvalidKeySpecException,
java.io.IOException
- Provides freshly generated 2048-bit RSA key pair. User comment is added as a comment to public key content
- Parameters:
userComment
- comment added to public key
- Returns:
- Pair where first value is public key and the second is private key
- Throws:
java.security.spec.InvalidKeySpecException
java.io.IOException
Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.