public class OpenSSHPrivateKeyFileBCFIPS
extends java.lang.Object
implements com.sshtools.common.publickey.SshPrivateKeyFile
Constructor and Description |
---|
OpenSSHPrivateKeyFileBCFIPS(byte[] formattedkey) |
OpenSSHPrivateKeyFileBCFIPS(com.sshtools.common.ssh.components.SshKeyPair pair,
java.lang.String passphrase) |
Modifier and Type | Method and Description |
---|---|
void |
changePassphrase(java.lang.String oldpassphrase,
java.lang.String newpassphrase) |
byte[] |
encryptKey(com.sshtools.common.ssh.components.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() |
com.sshtools.common.ssh.components.SshKeyPair |
toKeyPair(java.lang.String passphrase) |
public OpenSSHPrivateKeyFileBCFIPS(byte[] formattedkey) throws java.io.IOException
java.io.IOException
public OpenSSHPrivateKeyFileBCFIPS(com.sshtools.common.ssh.components.SshKeyPair pair, java.lang.String passphrase) throws java.io.IOException
java.io.IOException
public boolean isPassphraseProtected()
isPassphraseProtected
in interface com.sshtools.common.publickey.SshPrivateKeyFile
public java.lang.String getType()
getType
in interface com.sshtools.common.publickey.SshPrivateKeyFile
public boolean supportsPassphraseChange()
supportsPassphraseChange
in interface com.sshtools.common.publickey.SshPrivateKeyFile
public com.sshtools.common.ssh.components.SshKeyPair toKeyPair(java.lang.String passphrase) throws java.io.IOException, com.sshtools.common.publickey.InvalidPassphraseException
toKeyPair
in interface com.sshtools.common.publickey.SshPrivateKeyFile
java.io.IOException
com.sshtools.common.publickey.InvalidPassphraseException
public byte[] encryptKey(com.sshtools.common.ssh.components.SshKeyPair pair, java.lang.String passphrase) throws java.io.IOException
java.io.IOException
public void changePassphrase(java.lang.String oldpassphrase, java.lang.String newpassphrase) throws java.io.IOException, com.sshtools.common.publickey.InvalidPassphraseException
changePassphrase
in interface com.sshtools.common.publickey.SshPrivateKeyFile
java.io.IOException
com.sshtools.common.publickey.InvalidPassphraseException
public byte[] getFormattedKey()
getFormattedKey
in interface com.sshtools.common.publickey.SshPrivateKeyFile
public static boolean isFormatted(byte[] formattedkey)
public java.lang.String getComment()
getComment
in interface com.sshtools.common.publickey.SshPrivateKeyFile
Copyright © 2022. All rights reserved.