public static final KeysetHandle readWithAssociatedData(
      KeysetReader reader, Aead masterKey, byte[] associatedData)
      throws GeneralSecurityException, IOException {
    EncryptedKeyset encryptedKeyset = reader.readEncrypted();
    assertEnoughEncryptedKeyMaterial(encryptedKeyset);
    return KeysetHandle.fromKeyset(decrypt(encryptedKeyset, masterKey, associatedData));
  }
Tries to create a {@link KeysetHandle} from an encrypted keyset obtained via {@code reader},
using the provided associated data.

<p>Users that need to load cleartext keysets can use {@link CleartextKeysetHandle}.

@return a new {@link KeysetHandle} from {@code encryptedKeysetProto} that was encrypted with
    {@code masterKey}
@throws GeneralSecurityException if cannot decrypt the keyset or it doesn't contain encrypted
    key material
java_src/src/main/java/com/google/crypto/tink/KeysetHandle.java