public class SignatureDSA extends AbstractSignature
Signature| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ALGORITHM |
static int |
DSA_SIGNATURE_LENGTH |
static int |
MAX_SIGNATURE_VALUE_LENGTH |
| Modifier | Constructor and Description |
|---|---|
|
SignatureDSA() |
protected |
SignatureDSA(String algorithm) |
| Modifier and Type | Method and Description |
|---|---|
static void |
putBigInteger(BigInteger value,
byte[] result,
int offset) |
byte[] |
sign(SessionContext session)
Compute the signature
|
boolean |
verify(SessionContext session,
byte[] sig)
Verify against the given signature
|
doInitSignature, doVerify, extractEncodedSignature, extractEncodedSignature, getAlgorithm, getSignature, initSigner, initVerifier, toString, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSshAlgorithmName, updatepublic static final String DEFAULT_ALGORITHM
public static final int DSA_SIGNATURE_LENGTH
public static final int MAX_SIGNATURE_VALUE_LENGTH
public SignatureDSA()
protected SignatureDSA(String algorithm)
public byte[] sign(SessionContext session) throws Exception
Signaturesign in interface Signaturesign in class AbstractSignaturesession - The SessionContext for calling this method - may be null if not called within a
session contextException - If failed to calculate the signaturepublic static void putBigInteger(BigInteger value, byte[] result, int offset)
public boolean verify(SessionContext session, byte[] sig) throws Exception
Signaturesession - The SessionContext for calling this method - may be null if not called within a
session contextsig - The signed datatrue if signature is validException - If failed to extract signed data for validationCopyright © 2018–2024 The Apache Software Foundation. All rights reserved.