public class SshKeyUtils
extends java.lang.Object
| Constructor and Description |
|---|
SshKeyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
createPrivateKeyFile(SshKeyPair pair,
java.lang.String passphrase,
java.io.File file) |
static void |
createPrivateKeyFile(SshKeyPair pair,
java.lang.String passphrase,
java.io.File file,
int format) |
static void |
createPublicKeyFile(SshPublicKey publicKey,
java.lang.String comment,
java.io.File file) |
static void |
createPublicKeyFile(SshPublicKey publicKey,
java.lang.String comment,
java.io.File file,
int format) |
static java.lang.String |
getBubbleBabble(SshPublicKey pub) |
static SshCertificate |
getCertificate(java.io.File privateKey,
java.lang.String passphrase) |
static SshCertificate |
getCertificate(java.io.File privateKey,
java.lang.String passphrase,
java.io.File certFile) |
static SshCertificate |
getCertificate(java.io.InputStream privateKey,
java.lang.String passphrase,
java.io.InputStream certFile) |
static SshCertificate |
getCertificate(java.lang.String privateKey,
java.lang.String passphrase,
java.lang.String certFile) |
static SshKeyPair |
getCertificateAndKey(java.io.File privateKey,
java.lang.String passphrase) |
static java.lang.String |
getFingerprint(SshPublicKey key) |
static java.lang.String |
getFormattedKey(SshKeyPair pair,
java.lang.String passphrase) |
static java.lang.String |
getFormattedKey(SshPublicKey key,
java.lang.String comment) |
static java.lang.String |
getFormattedKey(SshPublicKey key,
java.lang.String comment,
int format) |
static java.lang.String |
getOpenSSHFormattedKey(SshPublicKey key) |
static java.lang.String |
getOpenSSHFormattedKey(SshPublicKey key,
java.lang.String comment) |
static SshKeyPair |
getPrivateKey(java.io.File key,
java.lang.String passphrase) |
static SshKeyPair |
getPrivateKey(java.io.InputStream key,
java.lang.String passphrase) |
static SshKeyPair |
getPrivateKey(java.lang.String formattedKey,
java.lang.String passphrase) |
static SshPublicKey |
getPublicKey(java.io.File key) |
static SshPublicKey |
getPublicKey(java.io.InputStream key) |
static SshPublicKey |
getPublicKey(java.lang.String formattedKey) |
static java.lang.String |
getPublicKeyComment(java.lang.String formattedKey) |
static SshKeyPair |
getRSAPrivateKeyWithSHA256Signature(java.io.File key,
java.lang.String passphrase) |
static SshKeyPair |
getRSAPrivateKeyWithSHA256Signature(java.io.InputStream key,
java.lang.String passphrase) |
static SshKeyPair |
getRSAPrivateKeyWithSHA256Signature(java.lang.String formattedKey,
java.lang.String passphrase) |
static SshKeyPair |
getRSAPrivateKeyWithSHA512Signature(java.io.File key,
java.lang.String passphrase) |
static SshKeyPair |
getRSAPrivateKeyWithSHA512Signature(java.io.InputStream key,
java.lang.String passphrase) |
static SshKeyPair |
getRSAPrivateKeyWithSHA512Signature(java.lang.String formattedKey,
java.lang.String passphrase) |
static boolean |
isPrivateKeyFile(java.io.File file) |
static SshKeyPair |
makeRSAWithSHA256Signature(SshKeyPair pair) |
static SshKeyPair |
makeRSAWithSHA512Signature(SshKeyPair pair) |
static void |
saveCertificate(SshCertificate pair,
java.lang.String passphrase,
java.lang.String comment,
java.io.File privateKeyFile) |
static void |
savePrivateKey(SshKeyPair pair,
java.lang.String passphrase,
java.lang.String comment,
java.io.File privateKeyFile) |
public static java.lang.String getOpenSSHFormattedKey(SshPublicKey key) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getOpenSSHFormattedKey(SshPublicKey key, java.lang.String comment) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getFormattedKey(SshPublicKey key, java.lang.String comment, int format) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getFormattedKey(SshPublicKey key, java.lang.String comment) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getFormattedKey(SshKeyPair pair, java.lang.String passphrase) throws java.io.IOException
java.io.IOExceptionpublic static SshPublicKey getPublicKey(java.io.File key) throws java.io.IOException
java.io.IOExceptionpublic static SshPublicKey getPublicKey(java.io.InputStream key) throws java.io.IOException
java.io.IOExceptionpublic static SshPublicKey getPublicKey(java.lang.String formattedKey) throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getPublicKeyComment(java.lang.String formattedKey)
throws java.io.IOException
java.io.IOExceptionpublic static SshKeyPair getPrivateKey(java.io.File key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getPrivateKey(java.io.InputStream key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getPrivateKey(java.lang.String formattedKey, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshCertificate getCertificate(java.io.File privateKey, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshCertificate getCertificate(java.io.File privateKey, java.lang.String passphrase, java.io.File certFile) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshCertificate getCertificate(java.io.InputStream privateKey, java.lang.String passphrase, java.io.InputStream certFile) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshCertificate getCertificate(java.lang.String privateKey, java.lang.String passphrase, java.lang.String certFile) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair makeRSAWithSHA256Signature(SshKeyPair pair)
public static SshKeyPair getRSAPrivateKeyWithSHA256Signature(java.lang.String formattedKey, java.lang.String passphrase) throws java.io.UnsupportedEncodingException, java.io.IOException, InvalidPassphraseException
java.io.UnsupportedEncodingExceptionjava.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getRSAPrivateKeyWithSHA256Signature(java.io.InputStream key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getRSAPrivateKeyWithSHA256Signature(java.io.File key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair makeRSAWithSHA512Signature(SshKeyPair pair)
public static SshKeyPair getRSAPrivateKeyWithSHA512Signature(java.lang.String formattedKey, java.lang.String passphrase) throws java.io.UnsupportedEncodingException, java.io.IOException, InvalidPassphraseException
java.io.UnsupportedEncodingExceptionjava.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getRSAPrivateKeyWithSHA512Signature(java.io.InputStream key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static SshKeyPair getRSAPrivateKeyWithSHA512Signature(java.io.File key, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static java.lang.String getFingerprint(SshPublicKey key)
public static java.lang.String getBubbleBabble(SshPublicKey pub)
public static void createPublicKeyFile(SshPublicKey publicKey, java.lang.String comment, java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic static void createPublicKeyFile(SshPublicKey publicKey, java.lang.String comment, java.io.File file, int format) throws java.io.IOException
java.io.IOExceptionpublic static void createPrivateKeyFile(SshKeyPair pair, java.lang.String passphrase, java.io.File file) throws java.io.IOException
java.io.IOExceptionpublic static void createPrivateKeyFile(SshKeyPair pair, java.lang.String passphrase, java.io.File file, int format) throws java.io.IOException
java.io.IOExceptionpublic static boolean isPrivateKeyFile(java.io.File file)
public static SshKeyPair getCertificateAndKey(java.io.File privateKey, java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
java.io.IOExceptionInvalidPassphraseExceptionpublic static void savePrivateKey(SshKeyPair pair, java.lang.String passphrase, java.lang.String comment, java.io.File privateKeyFile) throws java.io.IOException
java.io.IOExceptionpublic static void saveCertificate(SshCertificate pair, java.lang.String passphrase, java.lang.String comment, java.io.File privateKeyFile) throws java.io.IOException
java.io.IOExceptionCopyright © 2022. All rights reserved.