|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.ssh2.SSH2Signature
com.mindbright.ssh2.SSH2SimpleSignature
Handle signatures for the ssh draft standard algorithms.
Field Summary | |
protected boolean |
draftIncompatibleSignature
|
protected java.lang.String |
signatureAlgorithm
|
protected java.lang.String |
ssh2KeyFormat
|
Fields inherited from class com.mindbright.ssh2.SSH2Signature |
algorithm, privateKey, pubKeyBlob, publicKey, signature |
Constructor Summary | |
protected |
SSH2SimpleSignature(java.lang.String signatureAlgorithm,
java.lang.String ssh2KeyFormat)
Constructor. |
Method Summary | |
byte[] |
decodeSignature(byte[] sigBlob)
Decode a signature encoded according to the ssh standard. |
byte[] |
encodeSignature(byte[] sigRaw)
Encode the given signature into the form specified by the ssh standard. |
static java.lang.String |
getKeyFormat(byte[] pubKeyBlob)
Get the key format of the given public key. |
java.lang.String |
getSignatureAlgorithm()
Get the signature algorithm name. |
static SSH2Signature |
getVerifyInstance(byte[] pubKeyBlob)
Get an instance of SSH2Signature which is prepared to
do a verify operation which the given public key. |
void |
setIncompatibility(SSH2Transport transport)
Set the appropriate incompatibility mode which depends on the peer version. |
Methods inherited from class com.mindbright.ssh2.SSH2Signature |
clearSensitiveData, decodePublicKey, encodePublicKey, getAlgorithmName, getEncodingInstance, getInstance, getPublicKey, getPublicKeyBlob, initSign, initVerify, initVerify, setPublicKey, sign, verify |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String signatureAlgorithm
protected java.lang.String ssh2KeyFormat
protected boolean draftIncompatibleSignature
Constructor Detail |
protected SSH2SimpleSignature(java.lang.String signatureAlgorithm, java.lang.String ssh2KeyFormat)
signatureAlgorithm
- The algorithm name to use when looking in
the crypto provider for the implementation.ssh2KeyFormat
- The ssh2 name for this algorithm.Method Detail |
public static SSH2Signature getVerifyInstance(byte[] pubKeyBlob) throws SSH2Exception
SSH2Signature
which is prepared to
do a verify operation which the given public key.
pubKeyBlob
- Blob containing the public key to use.
SSH2Exception
public final java.lang.String getSignatureAlgorithm()
getSignatureAlgorithm
in class SSH2Signature
public byte[] encodeSignature(byte[] sigRaw)
encodeSignature
in class SSH2Signature
sigRaw
- The signature as a raw byte array.
public byte[] decodeSignature(byte[] sigBlob) throws SSH2SignatureException
decodeSignature
in class SSH2Signature
sigBlob
- a signature blob encodeded according to the ssh standard.
SSH2SignatureException
public static java.lang.String getKeyFormat(byte[] pubKeyBlob)
public void setIncompatibility(SSH2Transport transport)
setIncompatibility
in interface SSH2PKISigner
setIncompatibility
in class SSH2Signature
transport
- SSH2Transport
object which
identifies the peer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |