public class SshKeyUtils extends Object
Constructor and Description |
---|
SshKeyUtils() |
public static String getOpenSSHFormattedKey(SshPublicKey key) throws IOException
IOException
public static String getOpenSSHFormattedKey(SshPublicKey key, String comment) throws IOException
IOException
public static String getFormattedKey(SshPublicKey key, String comment, int format) throws IOException
IOException
public static String getFormattedKey(SshPublicKey key, String comment) throws IOException
IOException
public static SshPublicKey getPublicKey(File key) throws IOException
IOException
public static SshPublicKey getPublicKey(InputStream key) throws IOException
IOException
public static SshPublicKey getPublicKey(String formattedKey) throws IOException
IOException
public static String getPublicKeyComment(String formattedKey) throws IOException
IOException
public 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
Exception
public static String decrypt(SshRsaPublicKey publicKey, String toDecrypt) throws Exception
Exception
public static String encrypt(SshRsaPublicKey publicKey, String toEncrypt) throws Exception
Exception
public static String decrypt(SshRsaPrivateKey privateKey, String toDecrypt) throws Exception
Exception
public static String encryptOAEP(SshRsaPublicKey publicKey, String toEncrypt) throws Exception
Exception
public static String decryptOAEP(SshRsaPrivateKey privateKey, String toDecrypt) throws Exception
Exception
public static void savePrivateKey(SshKeyPair pair, String passphrase, String comment, File privateKeyFile) throws IOException
IOException
public static void saveCertificate(SshCertificate pair, String passphrase, String comment, File privateKeyFile) throws IOException
IOException
Copyright © 2024. All rights reserved.