Package org.bouncycastle.crypto.fips
Class FipsOutputVerifier<T extends Parameters>
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsOutputVerifier<T>
-
- Type Parameters:
T
- The parameters class for this verifier.
- All Implemented Interfaces:
OutputVerifier<T>
public abstract class FipsOutputVerifier<T extends Parameters> extends java.lang.Object implements OutputVerifier<T>
Base class for a FIPS signature verifier.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract T
getParameters()
Return the parameters for this output verifier.abstract UpdateOutputStream
getVerifyingStream()
Returns a stream that will accept data for the purpose of verifying a previously calculated signature.abstract boolean
isVerified(byte[] signature)
Return true if the data written to the verifying stream matches the data the signature was calculated against.
-
-
-
Method Detail
-
getParameters
public abstract T getParameters()
Description copied from interface:OutputVerifier
Return the parameters for this output verifier.- Specified by:
getParameters
in interfaceOutputVerifier<T extends Parameters>
- Returns:
- the verifier's parameters.
-
getVerifyingStream
public abstract UpdateOutputStream getVerifyingStream()
Description copied from interface:OutputVerifier
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.- Specified by:
getVerifyingStream
in interfaceOutputVerifier<T extends Parameters>
- Returns:
- an UpdateOutputStream
-
isVerified
public abstract boolean isVerified(byte[] signature) throws InvalidSignatureException
Description copied from interface:OutputVerifier
Return true if the data written to the verifying stream matches the data the signature was calculated against.- Specified by:
isVerified
in interfaceOutputVerifier<T extends Parameters>
- Parameters:
signature
- the signature to be confirmed.- Returns:
- true if the data verifies against the signature, false otherwise.
- Throws:
InvalidSignatureException
-
-