Package org.bouncycastle.crypto
Interface OutputVerifier<T extends Parameters>
-
- Type Parameters:
T- the parameters type for the verifier.
- All Known Subinterfaces:
OutputVerifierWithMessageRecovery<T>
- All Known Implementing Classes:
FipsOutputVerifier
public interface OutputVerifier<T extends Parameters>Base interface for an output verifier which can be used to verify a signature against a data stream.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TgetParameters()Return the parameters for this output verifier.UpdateOutputStreamgetVerifyingStream()Returns a stream that will accept data for the purpose of verifying a previously calculated signature.booleanisVerified(byte[] signature)Return true if the data written to the verifying stream matches the data the signature was calculated against.
-
-
-
Method Detail
-
getParameters
T getParameters()
Return the parameters for this output verifier.- Returns:
- the verifier's parameters.
-
getVerifyingStream
UpdateOutputStream getVerifyingStream()
Returns a stream that will accept data for the purpose of verifying a previously calculated signature. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.- Returns:
- an UpdateOutputStream
-
isVerified
boolean isVerified(byte[] signature) throws InvalidSignatureExceptionReturn true if the data written to the verifying stream matches the data the signature was calculated against.- Parameters:
signature- the signature to be confirmed.- Returns:
- true if the data verifies against the signature, false otherwise.
- Throws:
InvalidSignatureException
-
-