public class EcdsaUsingShaAlgorithm extends BaseSignatureAlgorithm implements JsonWebSignatureAlgorithm
Modifier and Type | Class and Description |
---|---|
static class |
EcdsaUsingShaAlgorithm.EcdsaP256UsingSha256 |
static class |
EcdsaUsingShaAlgorithm.EcdsaP384UsingSha384 |
static class |
EcdsaUsingShaAlgorithm.EcdsaP521UsingSha512 |
log
Constructor and Description |
---|
EcdsaUsingShaAlgorithm(String id,
String javaAlgo,
String curveName,
int signatureByteLength) |
Modifier and Type | Method and Description |
---|---|
static byte[] |
convertConcatenatedToDer(byte[] concatenatedSignatureBytes) |
static byte[] |
convertDerToConcatenated(byte[] derEncodedBytes,
int outputLength) |
String |
getCurveName() |
byte[] |
sign(Key key,
byte[] securedInputBytes) |
void |
validatePrivateKey(PrivateKey privateKey) |
void |
validatePublicKey(PublicKey publicKey) |
boolean |
verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes) |
isAvailable, setAlgorithmParameterSpec, validateSigningKey, validateVerificationKey
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validateSigningKey, validateVerificationKey
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, isAvailable
public boolean verifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes) throws JoseException
verifySignature
in interface JsonWebSignatureAlgorithm
verifySignature
in class BaseSignatureAlgorithm
JoseException
public byte[] sign(Key key, byte[] securedInputBytes) throws JoseException
sign
in interface JsonWebSignatureAlgorithm
sign
in class BaseSignatureAlgorithm
JoseException
public static byte[] convertConcatenatedToDer(byte[] concatenatedSignatureBytes) throws IOException
IOException
public static byte[] convertDerToConcatenated(byte[] derEncodedBytes, int outputLength) throws IOException
IOException
public void validatePrivateKey(PrivateKey privateKey) throws InvalidKeyException
validatePrivateKey
in class BaseSignatureAlgorithm
InvalidKeyException
public void validatePublicKey(PublicKey publicKey) throws InvalidKeyException
validatePublicKey
in class BaseSignatureAlgorithm
InvalidKeyException
public String getCurveName()
Copyright © 2015. All rights reserved.