test_class.file: java_src/src/test/java/com/google/crypto/tink/hybrid/HybridEncryptWrapperTest.java
test_class.identifier: HybridEncryptWrapperTest
test_case.body: @Test
    public void testBasicEncryption() throws Exception {
      EllipticCurveType curve = EllipticCurveType.NIST_P384;
      HashType hashType = HashType.SHA256;
      EcPointFormat primaryPointFormat = EcPointFormat.UNCOMPRESSED;
      EcPointFormat rawPointFormat = EcPointFormat.COMPRESSED;
      KeyTemplate primaryDemKeyTemplate = AeadKeyTemplates.AES128_CTR_HMAC_SHA256;
  
      KeyTemplate rawDemKeyTemplate = AeadKeyTemplates.AES128_CTR_HMAC_SHA256;
      byte[] primarySalt = "some salt".getBytes("UTF-8");
      byte[] rawSalt = "other salt".getBytes("UTF-8");
  
      EciesAeadHkdfPrivateKey primaryPrivProto =
          TestUtil.generateEciesAeadHkdfPrivKey(
              curve, hashType, primaryPointFormat, primaryDemKeyTemplate, primarySalt);
  
      Key primaryPriv =
          TestUtil.createKey(
              TestUtil.createKeyData(
                  primaryPrivProto,
                  new EciesAeadHkdfPrivateKeyManager().getKeyType(),
                  KeyData.KeyMaterialType.ASYMMETRIC_PRIVATE),
              8,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      Key primaryPub =
          TestUtil.createKey(
              TestUtil.createKeyData(
                  primaryPrivProto.getPublicKey(),
                  new EciesAeadHkdfPublicKeyManager().getKeyType(),
                  KeyData.KeyMaterialType.ASYMMETRIC_PUBLIC),
              42,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
  
      EciesAeadHkdfPrivateKey rawPrivProto =
          TestUtil.generateEciesAeadHkdfPrivKey(
              curve, hashType, rawPointFormat, rawDemKeyTemplate, rawSalt);
  
      Key rawPriv =
          TestUtil.createKey(
              TestUtil.createKeyData(
                  rawPrivProto,
                  new EciesAeadHkdfPrivateKeyManager().getKeyType(),
                  KeyData.KeyMaterialType.ASYMMETRIC_PRIVATE),
              11,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      Key rawPub =
          TestUtil.createKey(
              TestUtil.createKeyData(
                  rawPrivProto.getPublicKey(),
                  new EciesAeadHkdfPublicKeyManager().getKeyType(),
                  KeyData.KeyMaterialType.ASYMMETRIC_PUBLIC),
              43,
              KeyStatusType.ENABLED,
              OutputPrefixType.RAW);
      KeysetHandle keysetHandlePub =
          TestUtil.createKeysetHandle(TestUtil.createKeyset(primaryPub, rawPub));
      KeysetHandle keysetHandlePriv =
          TestUtil.createKeysetHandle(TestUtil.createKeyset(primaryPriv, rawPriv));
      HybridEncrypt hybridEncrypt =
          new HybridEncryptWrapper()
              .wrap(Registry.getPrimitives(keysetHandlePub, HybridEncrypt.class));
      HybridDecrypt hybridDecrypt =
          new HybridDecryptWrapper()
              .wrap(Registry.getPrimitives(keysetHandlePriv, HybridDecrypt.class));
      byte[] plaintext = Random.randBytes(20);
      byte[] contextInfo = Random.randBytes(20);
      byte[] ciphertext = hybridEncrypt.encrypt(plaintext, contextInfo);
      assertArrayEquals(plaintext, hybridDecrypt.decrypt(ciphertext, contextInfo));
    }
test_case.class_method_signature: HybridEncryptWrapperTest.testBasicEncryption()
test_case.full_signature: @Test public void testBasicEncryption()
test_case.identifier: testBasicEncryption
test_case.invocations: getBytes getBytes generateEciesAeadHkdfPrivKey createKey createKeyData getKeyType createKey createKeyData getPublicKey getKeyType generateEciesAeadHkdfPrivKey createKey createKeyData getKeyType createKey createKeyData getPublicKey getKeyType createKeysetHandle createKeyset createKeysetHandle createKeyset wrap getPrimitives wrap getPrimitives randBytes randBytes encrypt assertArrayEquals decrypt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasicEncryption()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/hybrid/HybridEncryptWrapper.java
focal_class.identifier: HybridEncryptWrapper
focal_class.interfaces: implements PrimitiveWrapper<HybridEncrypt, HybridEncrypt>
focal_class.class_method_signature: HybridEncryptWrapper.wrap(final PrimitiveSet<HybridEncrypt> primitives)
focal_class.full_signature: @Override public HybridEncrypt wrap(final PrimitiveSet<HybridEncrypt> primitives)
focal_class.identifier: wrap
focal_class.modifiers: @Override public
focal_class.parameters: (final PrimitiveSet<HybridEncrypt> primitives)
focal_class.return: HybridEncrypt
focal_class.signature: HybridEncrypt wrap(final PrimitiveSet<HybridEncrypt> primitives)
focal_class.class_method_signature: HybridEncryptWrapper.getPrimitiveClass()
focal_class.full_signature: @Override public Class<HybridEncrypt> getPrimitiveClass()
focal_class.identifier: getPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<HybridEncrypt>
focal_class.signature: Class<HybridEncrypt> getPrimitiveClass()
focal_class.class_method_signature: HybridEncryptWrapper.getInputPrimitiveClass()
focal_class.full_signature: @Override public Class<HybridEncrypt> getInputPrimitiveClass()
focal_class.identifier: getInputPrimitiveClass
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Class<HybridEncrypt>
focal_class.signature: Class<HybridEncrypt> getInputPrimitiveClass()
focal_class.class_method_signature: HybridEncryptWrapper.register()
focal_class.full_signature: public static void register()
focal_class.identifier: register
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void register()
focal_method.body: @Override
    public HybridEncrypt wrap(final PrimitiveSet<HybridEncrypt> primitives) {
      return new WrappedHybridEncrypt(primitives);
    }
focal_method.class_method_signature: HybridEncryptWrapper.wrap(final PrimitiveSet<HybridEncrypt> primitives)
focal_method.full_signature: @Override public HybridEncrypt wrap(final PrimitiveSet<HybridEncrypt> primitives)
focal_method.identifier: wrap
focal_method.modifiers: @Override public
focal_method.parameters: (final PrimitiveSet<HybridEncrypt> primitives)
focal_method.return: HybridEncrypt
focal_method.signature: HybridEncrypt wrap(final PrimitiveSet<HybridEncrypt> primitives)