public class SignatureECDSA extends AbstractSignature
Modifier and Type | Class and Description |
---|---|
static class |
SignatureECDSA.SignatureECDSA256 |
static class |
SignatureECDSA.SignatureECDSA384 |
static class |
SignatureECDSA.SignatureECDSA521 |
Modifier | Constructor and Description |
---|---|
protected |
SignatureECDSA(String algo) |
Modifier and Type | Method and Description |
---|---|
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, update
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSshAlgorithmName, update
protected SignatureECDSA(String algo)
public byte[] sign(SessionContext session) throws Exception
Signature
sign
in interface Signature
sign
in class AbstractSignature
session
- The SessionContext
for calling this method - may be null
if not called within a
session contextException
- If failed to calculate the signaturepublic boolean verify(SessionContext session, byte[] sig) throws Exception
Signature
session
- 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 © 2008–2024 The Apache Software Foundation. All rights reserved.