org.spongycastle.tls.crypto.TlsVerifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bctls-jdk15on Show documentation
Show all versions of bctls-jdk15on Show documentation
Spongy Castle is a package-rename (org.bouncycastle.* to org.spongycastle.*) of Bouncy Castle
intended for the Android platform. Android unfortunately ships with a stripped-down version of
Bouncy Castle, which prevents easy upgrades - Spongy Castle overcomes this and provides a full,
up-to-date version of the Bouncy Castle cryptographic libs.
package org.spongycastle.tls.crypto;
import java.io.IOException;
import org.spongycastle.tls.DigitallySigned;
/**
* Base interface for a TLS verfier that works with signatures and raw message digests.
*/
public interface TlsVerifier
{
/**
* Return true if the passed in signature and hash represent a real signature.
*
* @param signature the signature object containg the signature to be verified.
* @param hash the hash calculated for the signature.
* @return true if signature verifies, false otherwise.
* @throws IOException in case of an exception verifying signature.
*/
boolean verifySignature(DigitallySigned signature, byte[] hash) throws IOException;
}