public final class PublicKeyVerifyFactory extends Object
PublicKeyVerify instances.
KeysetHandle keysetHandle = ...;
PublicKeyVerify verifier = PublicKeyVerifyFactory.getPrimitive(keysetHandle);
verifier.verify(signature, data);
The returned primitive works with a keyset (rather than a single key). To verify a signature,
the primitive uses the prefix of the signature to efficiently select the right key in the set. If
there is no key associated with the prefix or if the keys associated with the prefix do not work,
the primitive tries all keys with OutputPrefixType.RAW.
| Constructor and Description |
|---|
PublicKeyVerifyFactory() |
| Modifier and Type | Method and Description |
|---|---|
static PublicKeyVerify |
getPrimitive(KeysetHandle keysetHandle) |
static PublicKeyVerify |
getPrimitive(KeysetHandle keysetHandle,
KeyManager<PublicKeyVerify> keyManager) |
public static PublicKeyVerify getPrimitive(KeysetHandle keysetHandle) throws GeneralSecurityException
keysetHandle.GeneralSecurityExceptionpublic static PublicKeyVerify getPrimitive(KeysetHandle keysetHandle, KeyManager<PublicKeyVerify> keyManager) throws GeneralSecurityException
keysetHandle and a custom keyManager.GeneralSecurityException