public class BcTlsSM2Verifier extends BcTlsVerifier
Modifier and Type | Field and Description |
---|---|
protected byte[] |
identifier |
crypto, publicKey
Constructor and Description |
---|
BcTlsSM2Verifier(BcTlsCrypto crypto,
org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey,
byte[] identifier) |
Modifier and Type | Method and Description |
---|---|
TlsStreamVerifier |
getStreamVerifier(DigitallySigned signature) |
boolean |
verifyRawSignature(DigitallySigned signature,
byte[] hash)
Return true if the passed in signature and hash represent a real signature.
|
public BcTlsSM2Verifier(BcTlsCrypto crypto, org.bouncycastle.crypto.params.ECPublicKeyParameters publicKey, byte[] identifier)
public boolean verifyRawSignature(DigitallySigned signature, byte[] hash) throws java.io.IOException
TlsVerifier
signature
- the signature object containing the signature to be verified.hash
- the hash calculated for the signature.java.io.IOException
- in case of an exception verifying signature.public TlsStreamVerifier getStreamVerifier(DigitallySigned signature)
getStreamVerifier
in interface TlsVerifier
getStreamVerifier
in class BcTlsVerifier