Package org.apache.sshd.common.signature
Class SignatureDSA
java.lang.Object
org.apache.sshd.common.signature.AbstractSignature
org.apache.sshd.common.signature.SignatureDSA
- All Implemented Interfaces:
AlgorithmNameProvider
,Signature
DSA
Signature
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
putBigInteger
(BigInteger value, byte[] result, int offset) byte[]
sign
(SessionContext session) Compute the signatureboolean
verify
(SessionContext session, byte[] sig) Verify against the given signatureMethods inherited from class org.apache.sshd.common.signature.AbstractSignature
doInitSignature, doVerify, extractEncodedSignature, extractEncodedSignature, getAlgorithm, getSignature, initSigner, initVerifier, toString, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.signature.Signature
getSshAlgorithmName, update
-
Field Details
-
DEFAULT_ALGORITHM
- See Also:
-
DSA_SIGNATURE_LENGTH
public static final int DSA_SIGNATURE_LENGTH- See Also:
-
MAX_SIGNATURE_VALUE_LENGTH
public static final int MAX_SIGNATURE_VALUE_LENGTH- See Also:
-
-
Constructor Details
-
SignatureDSA
public SignatureDSA() -
SignatureDSA
-
-
Method Details
-
sign
Description copied from interface:Signature
Compute the signature- Specified by:
sign
in interfaceSignature
- Overrides:
sign
in classAbstractSignature
- Parameters:
session
- TheSessionContext
for calling this method - may benull
if not called within a session context- Returns:
- The signature value
- Throws:
Exception
- If failed to calculate the signature
-
putBigInteger
-
verify
Description copied from interface:Signature
Verify against the given signature- Parameters:
session
- TheSessionContext
for calling this method - may benull
if not called within a session contextsig
- The signed data- Returns:
true
if signature is valid- Throws:
Exception
- If failed to extract signed data for validation
-