@Immutable public class DigitalSignatureValidator extends java.lang.Object implements SignatureValidator
Constructor and Description |
---|
DigitalSignatureValidator(java.nio.file.Path certPath) |
DigitalSignatureValidator(java.nio.file.Path certPath,
java.lang.String algorithm) |
DigitalSignatureValidator(java.lang.String certPem) |
DigitalSignatureValidator(java.lang.String certPem,
java.lang.String algorithm) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this object.
|
protected void |
finalize()
SpotBugs detects Bug Type "CT_CONSTRUCTOR_THROW" saying that "The object under construction
remains partially initialized and may be vulnerable to Finalizer attacks."
|
int |
hashCode()
Returns a hash code value for the object.
|
boolean |
validate(byte[] toBeValidated,
byte[] signatureBytes)
Validates the signature corresponds to the certificate.
|
public DigitalSignatureValidator(java.nio.file.Path certPath)
public DigitalSignatureValidator(java.nio.file.Path certPath, java.lang.String algorithm)
public DigitalSignatureValidator(java.lang.String certPem)
public DigitalSignatureValidator(java.lang.String certPem, java.lang.String algorithm)
protected final void finalize()
finalize
in class java.lang.Object
public boolean validate(byte[] toBeValidated, byte[] signatureBytes)
validate
in interface SignatureValidator
toBeValidated
- a byte array whose signature will be validatedsignatureBytes
- the bytes of the signatureSignatureException
- if it fails to validatepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
SignatureValidator
and both instances have the same
equals
in class java.lang.Object
o
- an object to be tested for equalitytrue
if the other object is "equal to" this object otherwise false