Class PrimitiveRegistry


  • public class PrimitiveRegistry
    extends java.lang.Object
    Allows registering PrimitiveConstructor objects, and creating primitives with those objects.
    • Method Detail

      • getPrimitive

        public <KeyT extends Key,​PrimitiveT> PrimitiveT getPrimitive​(KeyT key,
                                                                           java.lang.Class<PrimitiveT> primitiveClass)
                                                                    throws java.security.GeneralSecurityException
        Creates a primitive from a given key.

        This will look up a previously registered constructor for the given pair of (KeyT, PrimitiveT), and, if successful, use the registered PrimitiveConstructor object to create the requested primitive. Throws on a failed lookup, or if the primitive construction threw.

        Throws:
        java.security.GeneralSecurityException
      • wrap

        public <WrappedPrimitiveT> WrappedPrimitiveT wrap​(KeysetHandleInterface keysetHandle,
                                                          MonitoringAnnotations annotations,
                                                          java.lang.Class<WrappedPrimitiveT> wrapperClassObject)
                                                   throws java.security.GeneralSecurityException
        Throws:
        java.security.GeneralSecurityException