Package com.google.crypto.tink.signature
Class PublicKeyVerifyWrapper
- java.lang.Object
-
- com.google.crypto.tink.signature.PublicKeyVerifyWrapper
-
- All Implemented Interfaces:
PrimitiveWrapper<PublicKeyVerify,PublicKeyVerify>
public class PublicKeyVerifyWrapper extends java.lang.Object implements PrimitiveWrapper<PublicKeyVerify,PublicKeyVerify>
The implementation ofPrimitiveWrapper<DeterministicAead>.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.- Since:
- 1.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.crypto.tink.internal.PrimitiveWrapper
PrimitiveWrapper.PrimitiveFactory<B>
-
-
Constructor Summary
Constructors Constructor Description PublicKeyVerifyWrapper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<PublicKeyVerify>getInputPrimitiveClass()Returns the primitive class object of the primitive used to create B.java.lang.Class<PublicKeyVerify>getPrimitiveClass()Returns the primitive class object of the primitive managed.static voidregisterToInternalPrimitiveRegistry(PrimitiveRegistry.Builder primitiveRegistryBuilder)registerToInternalPrimitiveRegistry is a non-public method (it takes an argument of an internal-only type) registering an instance ofPublicKeyVerifyWrapperto the providedPrimitiveRegistry#Builder.PublicKeyVerifywrap(KeysetHandleInterface keysetHandle, MonitoringAnnotations annotations, PrimitiveWrapper.PrimitiveFactory<PublicKeyVerify> factory)Wraps aPrimitiveSetand returns a single instance.
-
-
-
Method Detail
-
wrap
public PublicKeyVerify wrap(KeysetHandleInterface keysetHandle, MonitoringAnnotations annotations, PrimitiveWrapper.PrimitiveFactory<PublicKeyVerify> factory) throws java.security.GeneralSecurityException
Description copied from interface:PrimitiveWrapperWraps aPrimitiveSetand returns a single instance.This method gets called when a new primitive is created.
- Specified by:
wrapin interfacePrimitiveWrapper<PublicKeyVerify,PublicKeyVerify>- Throws:
java.security.GeneralSecurityException
-
getPrimitiveClass
public java.lang.Class<PublicKeyVerify> getPrimitiveClass()
Description copied from interface:PrimitiveWrapperReturns the primitive class object of the primitive managed. Used for internal management. Should be implemented asreturn P.class;when implementing a wrapper creating objects of typeP.- Specified by:
getPrimitiveClassin interfacePrimitiveWrapper<PublicKeyVerify,PublicKeyVerify>
-
getInputPrimitiveClass
public java.lang.Class<PublicKeyVerify> getInputPrimitiveClass()
Description copied from interface:PrimitiveWrapperReturns the primitive class object of the primitive used to create B. Used for internal management. Should be implemented asreturn B.class;.- Specified by:
getInputPrimitiveClassin interfacePrimitiveWrapper<PublicKeyVerify,PublicKeyVerify>
-
registerToInternalPrimitiveRegistry
public static void registerToInternalPrimitiveRegistry(PrimitiveRegistry.Builder primitiveRegistryBuilder) throws java.security.GeneralSecurityException
registerToInternalPrimitiveRegistry is a non-public method (it takes an argument of an internal-only type) registering an instance ofPublicKeyVerifyWrapperto the providedPrimitiveRegistry#Builder.- Throws:
java.security.GeneralSecurityException
-
-