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- Author:
- Apache MINA SSHD Project
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidputBigInteger(BigInteger value, byte[] result, int offset) byte[]sign(SessionContext session) Compute the signaturebooleanverify(SessionContext session, byte[] sig) Verify against the given signatureMethods inherited from class org.apache.sshd.common.signature.AbstractSignature
doInitSignature, doVerify, extractEncodedSignature, extractEncodedSignature, getAlgorithm, getSignature, getSshAlgorithmName, initSigner, initVerifier, toString, 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:SignatureCompute the signature- Specified by:
signin interfaceSignature- Overrides:
signin classAbstractSignature- Parameters:
session- TheSessionContextfor calling this method - may benullif not called within a session context- Returns:
- The signature value
- Throws:
Exception- If failed to calculate the signature
-
putBigInteger
-
verify
Description copied from interface:SignatureVerify against the given signature- Parameters:
session- TheSessionContextfor calling this method - may benullif not called within a session contextsig- The signed data- Returns:
trueif signature is valid- Throws:
Exception- If failed to extract signed data for validation
-