Package com.google.crypto.tink.signature
Class PublicKeySignWrapper
- java.lang.Object
-
- com.google.crypto.tink.signature.PublicKeySignWrapper
-
- All Implemented Interfaces:
PrimitiveWrapper<PublicKeySign,PublicKeySign>
public class PublicKeySignWrapper extends java.lang.Object implements PrimitiveWrapper<PublicKeySign,PublicKeySign>
The implementation ofPrimitiveWrapper<PublicKeySign>.The returned primitive works with a keyset (rather than a single key). To sign a message, it uses the primary key in the keyset, and prepends to the signature a certain prefix associated with the primary key.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.crypto.tink.internal.PrimitiveWrapper
PrimitiveWrapper.PrimitiveFactory<B>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<PublicKeySign>getInputPrimitiveClass()Returns the primitive class object of the primitive used to create B.java.lang.Class<PublicKeySign>getPrimitiveClass()Returns the primitive class object of the primitive managed.static voidregister()Register the wrapper within the registry.static voidregisterToInternalPrimitiveRegistry(PrimitiveRegistry.Builder primitiveRegistryBuilder)registerToInternalPrimitiveRegistry is a non-public method (it takes an argument of an internal-only type) registering an instance ofPublicKeySignWrapperto the providedPrimitiveRegistry#Builder.PublicKeySignwrap(KeysetHandleInterface keysetHandle, MonitoringAnnotations annotations, PrimitiveWrapper.PrimitiveFactory<PublicKeySign> factory)Wraps aPrimitiveSetand returns a single instance.
-
-
-
Method Detail
-
wrap
public PublicKeySign wrap(KeysetHandleInterface keysetHandle, MonitoringAnnotations annotations, PrimitiveWrapper.PrimitiveFactory<PublicKeySign> 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<PublicKeySign,PublicKeySign>- Throws:
java.security.GeneralSecurityException
-
getPrimitiveClass
public java.lang.Class<PublicKeySign> 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<PublicKeySign,PublicKeySign>
-
getInputPrimitiveClass
public java.lang.Class<PublicKeySign> 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<PublicKeySign,PublicKeySign>
-
register
public static void register() throws java.security.GeneralSecurityExceptionRegister the wrapper within the registry.This is required for calls to
Keyset.getPrimitivewith aPublicKeySignargument.- Throws:
java.security.GeneralSecurityException
-
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 ofPublicKeySignWrapperto the providedPrimitiveRegistry#Builder.- Throws:
java.security.GeneralSecurityException
-
-