Interface ContentVerifier
public interface ContentVerifier
A streaming verifier of a signature over to-be-signed content.
Callers write the exact to-be-signed DER to contentStream() and then
call verify(byte[]) with the signature to check. Verification is
performed against a public key that was fixed when the verifier was created
(see the zeroecho.pkix factory methods).
Lifecycle
An instance is single-use and need not be thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the stream into which the to-be-signed bytes are written.booleanverify(byte[] signature) Verifies the given signature against the content written tocontentStream().
-
Method Details
-
contentStream
OutputStream contentStream()Returns the stream into which the to-be-signed bytes are written.- Returns:
- the to-be-signed content output stream
-
verify
boolean verify(byte[] signature) Verifies the given signature against the content written tocontentStream().- Parameters:
signature- the signature bytes to verify- Returns:
trueif the signature is valid,falseotherwise
-