|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maverick.crypto.publickey.DsaKey
com.maverick.crypto.publickey.DsaPublicKey
com.maverick.ssh2.Ssh2DsaPublicKey
Represents an SSH2 DSA public key.
Field Summary |
Fields inherited from class com.maverick.crypto.publickey.DsaPublicKey |
y |
Fields inherited from class com.maverick.crypto.publickey.DsaKey |
g, p, q |
Constructor Summary | |
Ssh2DsaPublicKey()
Default contructor used to initialize the key from an encoded byte array using the init method. |
|
Ssh2DsaPublicKey(java.math.BigInteger p,
java.math.BigInteger q,
java.math.BigInteger g,
java.math.BigInteger y)
Construct a DSA key from the parameters. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAlgorithm()
The algorithm name is "ssh-dss" |
byte[] |
getEncoded()
Returns the key encoded into a byte array as defined in the SSH Transport Protocol. |
java.lang.String |
getFingerprint()
Return an SSH fingerprint of the public key |
int |
hashCode()
|
void |
init(byte[] blob,
int start,
int len)
Initialize the public key from an SSH2 key blob |
boolean |
verifySignature(byte[] signature,
byte[] data)
Verify the signature. |
Methods inherited from class com.maverick.crypto.publickey.DsaPublicKey |
getBitLength, getY, verifySignature |
Methods inherited from class com.maverick.crypto.publickey.DsaKey |
getG, getP, getQ |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.maverick.ssh.SshPublicKey |
getBitLength |
Constructor Detail |
public Ssh2DsaPublicKey(java.math.BigInteger p, java.math.BigInteger q, java.math.BigInteger g, java.math.BigInteger y)
p
- q
- g
- y
- public Ssh2DsaPublicKey()
Method Detail |
public java.lang.String getAlgorithm()
getAlgorithm
in interface SshPublicKey
public byte[] getEncoded() throws SshException
The "ssh-dss" public key format has the following specific encoding: String "ssh-dss" BigInteger p BigInteger q BigInteger g BigInteger y
getEncoded
in interface SshPublicKey
SshException
public java.lang.String getFingerprint() throws SshException
SshPublicKey
getFingerprint
in interface SshPublicKey
SshException
public void init(byte[] blob, int start, int len) throws SshException
init
in interface SshPublicKey
start
- the offset in the key data to start readinglen
- the length of the key datablob
-
java.io.IOException
SshException
public boolean verifySignature(byte[] signature, byte[] data)
SshPublicKey
verifySignature
in interface SshPublicKey
signature
-
true
if the signature is valid, otherwise false
public boolean equals(java.lang.Object obj)
public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |