public class SshKeyUtils extends Object
| Constructor and Description | 
|---|
| SshKeyUtils() | 
public static String getOpenSSHFormattedKey(SshPublicKey key) throws IOException
IOExceptionpublic static String getOpenSSHFormattedKey(SshPublicKey key, String comment) throws IOException
IOExceptionpublic static String getFormattedKey(SshPublicKey key, String comment, int format) throws IOException
IOExceptionpublic static String getFormattedKey(SshPublicKey key, String comment) throws IOException
IOExceptionpublic static SshPublicKey getPublicKey(File key) throws IOException
IOExceptionpublic static SshPublicKey getPublicKey(InputStream key) throws IOException
IOExceptionpublic static SshPublicKey getPublicKey(String formattedKey) throws IOException
IOExceptionpublic static String getPublicKeyComment(String formattedKey) throws IOException
IOExceptionpublic static SshKeyPair getPrivateKey(File key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getPrivateKeyOrCertificate(File key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getPrivateKey(InputStream key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getPrivateKey(String formattedKey, String passphrase) throws IOException, InvalidPassphraseException
public static SshCertificate getCertificate(File privateKey, String passphrase) throws IOException, InvalidPassphraseException
public static SshCertificate getCertificate(File privateKey, String passphrase, File certFile) throws IOException, InvalidPassphraseException
public static SshCertificate getCertificate(InputStream privateKey, String passphrase, InputStream certFile) throws IOException, InvalidPassphraseException
public static SshCertificate getCertificate(String privateKey, String passphrase, String certFile) throws IOException, InvalidPassphraseException
public static SshKeyPair makeRSAWithSHA256Signature(SshKeyPair pair)
public static SshKeyPair getRSAPrivateKeyWithSHA256Signature(String formattedKey, String passphrase) throws UnsupportedEncodingException, IOException, InvalidPassphraseException
public static SshKeyPair getRSAPrivateKeyWithSHA256Signature(InputStream key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getRSAPrivateKeyWithSHA256Signature(File key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair makeRSAWithSHA512Signature(SshKeyPair pair)
public static SshKeyPair getRSAPrivateKeyWithSHA512Signature(String formattedKey, String passphrase) throws UnsupportedEncodingException, IOException, InvalidPassphraseException
public static SshKeyPair getRSAPrivateKeyWithSHA512Signature(InputStream key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getRSAPrivateKeyWithSHA512Signature(File key, String passphrase) throws IOException, InvalidPassphraseException
public static String getFingerprint(SshPublicKey key)
public static String getBubbleBabble(SshPublicKey pub)
public static String encrypt(SshRsaPrivateKey privateKey, String toEncrypt) throws Exception
Exceptionpublic static String decrypt(SshRsaPublicKey publicKey, String toDecrypt) throws Exception
Exceptionpublic static String encrypt(SshRsaPublicKey publicKey, String toEncrypt) throws Exception
Exceptionpublic static String decrypt(SshRsaPrivateKey privateKey, String toDecrypt) throws Exception
Exceptionpublic static String encryptOAEP(SshRsaPublicKey publicKey, String toEncrypt) throws Exception
Exceptionpublic static String decryptOAEP(SshRsaPrivateKey privateKey, String toDecrypt) throws Exception
Exceptionpublic static void savePrivateKey(SshKeyPair pair, String passphrase, String comment, File privateKeyFile) throws IOException
IOExceptionpublic static void saveCertificate(SshCertificate pair, String passphrase, String comment, File privateKeyFile) throws IOException
IOExceptionCopyright © 2025. All rights reserved.