public class Ssh2DsaPublicKey extends Object implements SshDsaPublicKey
| Modifier and Type | Field and Description |
|---|---|
protected DSAPublicKey |
pubkey |
| Constructor and Description |
|---|
Ssh2DsaPublicKey() |
Ssh2DsaPublicKey(BigInteger p,
BigInteger q,
BigInteger g,
BigInteger y) |
Ssh2DsaPublicKey(DSAPublicKey pub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getAlgorithm()
Get the algorithm name for the public key.
|
int |
getBitLength()
Get the bit length of the public key
|
byte[] |
getEncoded()
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.
|
String |
getEncodingAlgorithm()
The algorithm name used in the encoding of the public key
|
String |
getFingerprint()
Return an SSH fingerprint of the public key
|
BigInteger |
getG() |
DSAPublicKey |
getJCEPublicKey()
Get the JCE component of this key.
|
BigInteger |
getP() |
int |
getPriority() |
BigInteger |
getQ() |
SecurityLevel |
getSecurityLevel() |
String |
getSigningAlgorithm()
The algorithm name expected to be encoded in SSH signatures
|
BigInteger |
getY() |
int |
hashCode() |
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from a blob of binary data.
|
String |
test()
Test the JCE for algorithm availability.
|
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature.
|
protected DSAPublicKey pubkey
public Ssh2DsaPublicKey()
public Ssh2DsaPublicKey(DSAPublicKey pub)
public Ssh2DsaPublicKey(BigInteger p, BigInteger q, BigInteger g, BigInteger y) throws NoSuchAlgorithmException, InvalidKeySpecException
public DSAPublicKey getJCEPublicKey()
SshPublicKeygetJCEPublicKey in interface SshDsaPublicKeygetJCEPublicKey in interface SshPublicKeypublic SecurityLevel getSecurityLevel()
getSecurityLevel in interface SecureComponentpublic int getPriority()
getPriority in interface SecureComponentpublic String getAlgorithm()
getAlgorithm in interface SshPublicKeygetAlgorithm in interface SecureComponentpublic String getEncodingAlgorithm()
SshPublicKeygetEncodingAlgorithm in interface SshPublicKeypublic int getBitLength()
SshPublicKeygetBitLength in interface SshPublicKeypublic byte[] getEncoded()
throws SshException
getEncoded in interface SshPublicKeySshExceptionpublic String getFingerprint() throws SshException
SshPublicKeygetFingerprint in interface SshPublicKeySshExceptionpublic void init(byte[] blob,
int start,
int len)
throws SshException
init in interface SshPublicKeyblob - byte[]start - intlen - intSshExceptionpublic boolean verifySignature(byte[] signature,
byte[] data)
throws SshException
verifySignature in interface SshPublicKeysignature - byte[]data - byte[]true if the signature was produced by the
corresponding private key that owns this public key, otherwise
false.SshExceptionpublic BigInteger getG()
getG in interface SshDsaPublicKeypublic BigInteger getP()
getP in interface SshDsaPublicKeypublic BigInteger getQ()
getQ in interface SshDsaPublicKeypublic BigInteger getY()
getY in interface SshDsaPublicKeypublic String test()
SshPublicKeytest in interface SshPublicKeypublic String getSigningAlgorithm()
SshPublicKeygetSigningAlgorithm in interface SshPublicKeyCopyright © 2025. All rights reserved.