test_class.file: java_src/src/test/java/com/google/crypto/tink/NoSecretKeysetHandleTest.java
test_class.identifier: NoSecretKeysetHandleTest
test_case.body: @Test
    public void testBasic() throws Exception {
      // Create a keyset that contains a single HmacKey.
      KeyTemplate template = MacKeyTemplates.HMAC_SHA256_128BITTAG;
      KeysetManager manager = KeysetManager.withEmptyKeyset().rotate(template);
      Keyset keyset = manager.getKeysetHandle().getKeyset();
      try {
        KeysetHandle unused = NoSecretKeysetHandle.parseFrom(keyset.toByteArray());
        fail("Expected GeneralSecurityException");
      } catch (GeneralSecurityException e) {
        assertExceptionContains(e, "keyset contains secret key material");
      }
    }
test_case.class_method_signature: NoSecretKeysetHandleTest.testBasic()
test_case.full_signature: @Test public void testBasic()
test_case.identifier: testBasic
test_case.invocations: rotate withEmptyKeyset getKeyset getKeysetHandle parseFrom toByteArray fail assertExceptionContains
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBasic()
focal_class.file: java_src/src/main/java/com/google/crypto/tink/NoSecretKeysetHandle.java
focal_class.identifier: NoSecretKeysetHandle
focal_class.class_method_signature: NoSecretKeysetHandle.parseFrom(final byte[] serialized)
focal_class.full_signature: @Deprecated public static final KeysetHandle parseFrom(final byte[] serialized)
focal_class.identifier: parseFrom
focal_class.modifiers: @Deprecated public static final
focal_class.parameters: (final byte[] serialized)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle parseFrom(final byte[] serialized)
focal_class.class_method_signature: NoSecretKeysetHandle.read(KeysetReader reader)
focal_class.full_signature: public static final KeysetHandle read(KeysetReader reader)
focal_class.identifier: read
focal_class.modifiers: public static final
focal_class.parameters: (KeysetReader reader)
focal_class.return: KeysetHandle
focal_class.signature: KeysetHandle read(KeysetReader reader)
focal_class.class_method_signature: NoSecretKeysetHandle.validate(Keyset keyset)
focal_class.full_signature: private static void validate(Keyset keyset)
focal_class.identifier: validate
focal_class.modifiers: private static
focal_class.parameters: (Keyset keyset)
focal_class.return: void
focal_class.signature: void validate(Keyset keyset)
focal_method.body: @Deprecated
    public static final KeysetHandle parseFrom(final byte[] serialized)
        throws GeneralSecurityException {
      try {
        Keyset keyset = Keyset.parseFrom(serialized, ExtensionRegistryLite.getEmptyRegistry());
        validate(keyset);
        return KeysetHandle.fromKeyset(keyset);
      } catch (InvalidProtocolBufferException e) {
        throw new GeneralSecurityException("invalid keyset");
      }
    }
focal_method.class_method_signature: NoSecretKeysetHandle.parseFrom(final byte[] serialized)
focal_method.full_signature: @Deprecated public static final KeysetHandle parseFrom(final byte[] serialized)
focal_method.identifier: parseFrom
focal_method.invocations: parseFrom getEmptyRegistry validate fromKeyset
focal_method.modifiers: @Deprecated public static final
focal_method.parameters: (final byte[] serialized)
focal_method.return: KeysetHandle
focal_method.signature: KeysetHandle parseFrom(final byte[] serialized)