private static void assertEnoughKeyMaterial(Keyset keyset) throws GeneralSecurityException {
    if (keyset == null || keyset.getKeyCount() <= 0) {
      throw new GeneralSecurityException("empty keyset");
    }
  }
Validates that a keyset handle contains enough key material to build a keyset on.

@throws GeneralSecurityException if the validation fails
java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java