public class OpenSSHPrivateKeyFileBC extends java.lang.Object implements SshPrivateKeyFile
| Constructor and Description |
|---|
OpenSSHPrivateKeyFileBC(byte[] formattedkey) |
OpenSSHPrivateKeyFileBC(SshKeyPair pair,
java.lang.String passphrase) |
| Modifier and Type | Method and Description |
|---|---|
void |
changePassphrase(java.lang.String oldpassphrase,
java.lang.String newpassphrase) |
byte[] |
encryptKey(SshKeyPair pair,
java.lang.String passphrase) |
java.lang.String |
getComment() |
byte[] |
getFormattedKey() |
java.lang.String |
getType() |
static boolean |
isFormatted(byte[] formattedkey) |
boolean |
isPassphraseProtected() |
boolean |
supportsPassphraseChange() |
SshKeyPair |
toKeyPair(java.lang.String passphrase) |
public OpenSSHPrivateKeyFileBC(byte[] formattedkey)
throws java.io.IOException
java.io.IOExceptionpublic OpenSSHPrivateKeyFileBC(SshKeyPair pair, java.lang.String passphrase) throws java.io.IOException
java.io.IOExceptionpublic boolean isPassphraseProtected()
isPassphraseProtected in interface SshPrivateKeyFilepublic java.lang.String getType()
getType in interface SshPrivateKeyFilepublic boolean supportsPassphraseChange()
supportsPassphraseChange in interface SshPrivateKeyFilepublic SshKeyPair toKeyPair(java.lang.String passphrase) throws java.io.IOException, InvalidPassphraseException
toKeyPair in interface SshPrivateKeyFilejava.io.IOExceptionInvalidPassphraseExceptionpublic byte[] encryptKey(SshKeyPair pair, java.lang.String passphrase) throws java.io.IOException
java.io.IOExceptionpublic void changePassphrase(java.lang.String oldpassphrase,
java.lang.String newpassphrase)
throws java.io.IOException,
InvalidPassphraseException
changePassphrase in interface SshPrivateKeyFilejava.io.IOExceptionInvalidPassphraseExceptionpublic byte[] getFormattedKey()
getFormattedKey in interface SshPrivateKeyFilepublic static boolean isFormatted(byte[] formattedkey)
public java.lang.String getComment()
getComment in interface SshPrivateKeyFileCopyright © 2022. All rights reserved.