Class HybridEncryptWrapper

  • All Implemented Interfaces:
    PrimitiveWrapper<HybridEncrypt,​HybridEncrypt>

    public class HybridEncryptWrapper
    extends java.lang.Object
    implements PrimitiveWrapper<HybridEncrypt,​HybridEncrypt>
    The implementation of PrimitiveWrapper<HybridEncrypt>.

    The returned primitive works with a keyset (rather than a single key). To encrypt a plaintext, it uses the primary key in the keyset, and prepends to the ciphertext a certain prefix associated with the primary key.

    • Method Detail

      • register

        public static void register()
                             throws java.security.GeneralSecurityException
        Register the wrapper within the registry.

        This is required for calls to Keyset.getPrimitive with a HybridEncrypt argument.

        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 of HybridEncryptWrapper to the provided PrimitiveRegistry.Builder.
        Throws:
        java.security.GeneralSecurityException