Class HybridDecryptWrapper

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

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

    The returned primitive works with a keyset (rather than a single key). To decrypt, the primitive uses the prefix of the ciphertext to efficiently select the right key in the set. If the keys associated with the prefix do not work, the primitive tries all keys with OutputPrefixType.RAW.

    • 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 HybridDecrypt 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 HybridDecryptWrapper to the provided PrimitiveRegistry.Builder.
        Throws:
        java.security.GeneralSecurityException