test_class.file: java_src/src/test/java/com/google/crypto/tink/KeysetHandleTest.java
test_class.identifier: KeysetHandleTest
test_case.body: @Test
    public void readNoSecretFailWithEmptyKeyset() throws Exception {
      try {
        KeysetHandle unused = KeysetHandle.readNoSecret(new byte[0]);
        fail("Expected GeneralSecurityException");
      } catch (GeneralSecurityException e) {
        assertExceptionContains(e, "empty keyset");
      }
    }
test_case.class_method_signature: KeysetHandleTest.readNoSecretFailWithEmptyKeyset()
test_case.full_signature: @Test public void readNoSecretFailWithEmptyKeyset()
test_case.identifier: readNoSecretFailWithEmptyKeyset
test_case.invocations: readNoSecret fail assertExceptionContains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void readNoSecretFailWithEmptyKeyset()
focal_class.declarator: keyset
focal_class.modifier: private final
focal_class.original_string: private final Keyset keyset;
focal_class.type: Keyset
focal_class.var_name: keyset
focal_class.file: java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java
focal_class.identifier: KeysetHandle
focal_class.class_method_signature: KeysetHandle.KeysetHandle(Keyset keyset)
focal_class.full_signature: private  KeysetHandle(Keyset keyset)
focal_class.identifier: KeysetHandle
focal_class.modifiers: private
focal_class.parameters: (Keyset keyset)
focal_class.signature:  KeysetHandle(Keyset keyset)
focal_class.class_method_signature: KeysetHandle.fromKeyset(Keyset keyset)
focal_class.full_signature: static final KeysetHandle fromKeyset(Keyset keyset)
focal_class.identifier: fromKeyset
focal_class.modifiers: static final
focal_class.parameters: (Keyset keyset)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle fromKeyset(Keyset keyset)
focal_class.class_method_signature: KeysetHandle.getKeyset()
focal_class.full_signature:  Keyset getKeyset()
focal_class.identifier: getKeyset
focal_class.parameters: ()
focal_class.return: Keyset
focal_class.signature: Keyset getKeyset()
focal_class.class_method_signature: KeysetHandle.getKeysetInfo()
focal_class.full_signature: public KeysetInfo getKeysetInfo()
focal_class.identifier: getKeysetInfo
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: KeysetInfo
focal_class.signature: KeysetInfo getKeysetInfo()
focal_class.class_method_signature: KeysetHandle.generateNew(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
focal_class.full_signature: @Deprecated public static final KeysetHandle generateNew(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
focal_class.identifier: generateNew
focal_class.modifiers: @Deprecated public static final
focal_class.parameters: (com.google.crypto.tink.proto.KeyTemplate keyTemplate)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle generateNew(com.google.crypto.tink.proto.KeyTemplate keyTemplate)
focal_class.class_method_signature: KeysetHandle.generateNew(KeyTemplate keyTemplate)
focal_class.full_signature: public static final KeysetHandle generateNew(KeyTemplate keyTemplate)
focal_class.identifier: generateNew
focal_class.modifiers: public static final
focal_class.parameters: (KeyTemplate keyTemplate)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle generateNew(KeyTemplate keyTemplate)
focal_class.class_method_signature: KeysetHandle.read(KeysetReader reader, Aead masterKey)
focal_class.full_signature: public static final KeysetHandle read(KeysetReader reader, Aead masterKey)
focal_class.identifier: read
focal_class.modifiers: public static final
focal_class.parameters: (KeysetReader reader, Aead masterKey)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle read(KeysetReader reader, Aead masterKey)
focal_class.class_method_signature: KeysetHandle.readNoSecret(KeysetReader reader)
focal_class.full_signature: public static final KeysetHandle readNoSecret(KeysetReader reader)
focal_class.identifier: readNoSecret
focal_class.modifiers: public static final
focal_class.parameters: (KeysetReader reader)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle readNoSecret(KeysetReader reader)
focal_class.class_method_signature: KeysetHandle.readNoSecret(final byte[] serialized)
focal_class.full_signature: public static final KeysetHandle readNoSecret(final byte[] serialized)
focal_class.identifier: readNoSecret
focal_class.modifiers: public static final
focal_class.parameters: (final byte[] serialized)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle readNoSecret(final byte[] serialized)
focal_class.class_method_signature: KeysetHandle.write(KeysetWriter keysetWriter, Aead masterKey)
focal_class.full_signature: public void write(KeysetWriter keysetWriter, Aead masterKey)
focal_class.identifier: write
focal_class.modifiers: public
focal_class.parameters: (KeysetWriter keysetWriter, Aead masterKey)
focal_class.return: void
focal_class.signature: void write(KeysetWriter keysetWriter, Aead masterKey)
focal_class.class_method_signature: KeysetHandle.writeNoSecret(KeysetWriter writer)
focal_class.full_signature: public void writeNoSecret(KeysetWriter writer)
focal_class.identifier: writeNoSecret
focal_class.modifiers: public
focal_class.parameters: (KeysetWriter writer)
focal_class.return: void
focal_class.signature: void writeNoSecret(KeysetWriter writer)
focal_class.class_method_signature: KeysetHandle.encrypt(Keyset keyset, Aead masterKey)
focal_class.full_signature: private static EncryptedKeyset encrypt(Keyset keyset, Aead masterKey)
focal_class.identifier: encrypt
focal_class.modifiers: private static
focal_class.parameters: (Keyset keyset, Aead masterKey)
focal_class.return: EncryptedKeyset
focal_class.signature: EncryptedKeyset encrypt(Keyset keyset, Aead masterKey)
focal_class.class_method_signature: KeysetHandle.decrypt(EncryptedKeyset encryptedKeyset, Aead masterKey)
focal_class.full_signature: private static Keyset decrypt(EncryptedKeyset encryptedKeyset, Aead masterKey)
focal_class.identifier: decrypt
focal_class.modifiers: private static
focal_class.parameters: (EncryptedKeyset encryptedKeyset, Aead masterKey)
focal_class.return: Keyset
focal_class.signature: Keyset decrypt(EncryptedKeyset encryptedKeyset, Aead masterKey)
focal_class.class_method_signature: KeysetHandle.getPublicKeysetHandle()
focal_class.full_signature: public KeysetHandle getPublicKeysetHandle()
focal_class.identifier: getPublicKeysetHandle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle getPublicKeysetHandle()
focal_class.class_method_signature: KeysetHandle.createPublicKeyData(KeyData privateKeyData)
focal_class.full_signature: private static KeyData createPublicKeyData(KeyData privateKeyData)
focal_class.identifier: createPublicKeyData
focal_class.modifiers: private static
focal_class.parameters: (KeyData privateKeyData)
focal_class.return: KeyData
focal_class.signature: KeyData createPublicKeyData(KeyData privateKeyData)
focal_class.class_method_signature: KeysetHandle.validate(KeyData keyData)
focal_class.full_signature: @SuppressWarnings("deprecation") private static void validate(KeyData keyData)
focal_class.identifier: validate
focal_class.modifiers: @SuppressWarnings("deprecation") private static
focal_class.parameters: (KeyData keyData)
focal_class.return: void
focal_class.signature: void validate(KeyData keyData)
focal_class.class_method_signature: KeysetHandle.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: KeysetHandle.assertNoSecretKeyMaterial(Keyset keyset)
focal_class.full_signature: private static void assertNoSecretKeyMaterial(Keyset keyset)
focal_class.identifier: assertNoSecretKeyMaterial
focal_class.modifiers: private static
focal_class.parameters: (Keyset keyset)
focal_class.return: void
focal_class.signature: void assertNoSecretKeyMaterial(Keyset keyset)
focal_class.class_method_signature: KeysetHandle.assertEnoughKeyMaterial(Keyset keyset)
focal_class.full_signature: public static void assertEnoughKeyMaterial(Keyset keyset)
focal_class.identifier: assertEnoughKeyMaterial
focal_class.modifiers: public static
focal_class.parameters: (Keyset keyset)
focal_class.return: void
focal_class.signature: void assertEnoughKeyMaterial(Keyset keyset)
focal_class.class_method_signature: KeysetHandle.assertEnoughEncryptedKeyMaterial(EncryptedKeyset keyset)
focal_class.full_signature: public static void assertEnoughEncryptedKeyMaterial(EncryptedKeyset keyset)
focal_class.identifier: assertEnoughEncryptedKeyMaterial
focal_class.modifiers: public static
focal_class.parameters: (EncryptedKeyset keyset)
focal_class.return: void
focal_class.signature: void assertEnoughEncryptedKeyMaterial(EncryptedKeyset keyset)
focal_class.class_method_signature: KeysetHandle.getPrimitiveWithKnownInputPrimitive(
        Class<P> classObject, Class<B> inputPrimitiveClassObject)
focal_class.full_signature: private P getPrimitiveWithKnownInputPrimitive(
        Class<P> classObject, Class<B> inputPrimitiveClassObject)
focal_class.identifier: getPrimitiveWithKnownInputPrimitive
focal_class.modifiers: private
focal_class.parameters: (
        Class<P> classObject, Class<B> inputPrimitiveClassObject)
focal_class.return: P
focal_class.signature: P getPrimitiveWithKnownInputPrimitive(
        Class<P> classObject, Class<B> inputPrimitiveClassObject)
focal_class.class_method_signature: KeysetHandle.getPrimitive(Class<P> targetClassObject)
focal_class.full_signature: public P getPrimitive(Class<P> targetClassObject)
focal_class.identifier: getPrimitive
focal_class.modifiers: public
focal_class.parameters: (Class<P> targetClassObject)
focal_class.return: P
focal_class.signature: P getPrimitive(Class<P> targetClassObject)
focal_class.class_method_signature: KeysetHandle.getPrimitive(KeyManager<P> customKeyManager, Class<P> targetClassObject)
focal_class.full_signature: public P getPrimitive(KeyManager<P> customKeyManager, Class<P> targetClassObject)
focal_class.identifier: getPrimitive
focal_class.modifiers: public
focal_class.parameters: (KeyManager<P> customKeyManager, Class<P> targetClassObject)
focal_class.return: P
focal_class.signature: P getPrimitive(KeyManager<P> customKeyManager, Class<P> targetClassObject)
focal_method.body: public static final KeysetHandle readNoSecret(KeysetReader reader)
        throws GeneralSecurityException, IOException {
      try {
        Keyset keyset = reader.read();
        assertNoSecretKeyMaterial(keyset);
        return KeysetHandle.fromKeyset(keyset);
      } catch (@SuppressWarnings("UnusedException") InvalidProtocolBufferException e) {
        // Do not propagate InvalidProtocolBufferException to guarantee no key material is leaked
        throw new GeneralSecurityException("invalid keyset");
      }
    }
focal_method.class_method_signature: KeysetHandle.readNoSecret(KeysetReader reader)
focal_method.full_signature: public static final KeysetHandle readNoSecret(KeysetReader reader)
focal_method.identifier: readNoSecret
focal_method.invocations: read assertNoSecretKeyMaterial fromKeyset
focal_method.modifiers: public static final
focal_method.parameters: (KeysetReader reader)
focal_method.return: KeysetHandle
focal_method.signature: KeysetHandle readNoSecret(KeysetReader reader)