@Override
  public byte[] decrypt(final byte[] ciphertext, final byte[] associatedData)
      throws GeneralSecurityException {
    if (ciphertext.length < IV_SIZE_IN_BYTES + TAG_SIZE_IN_BYTES) {
      throw new GeneralSecurityException("ciphertext too short");
    }
    try {
      return decryptInternal(ciphertext, associatedData);
    } catch (AEADBadTagException ex) {
      throw ex;
    } catch (ProviderException | GeneralSecurityException ex) {
      Log.w(TAG, "encountered a potentially transient KeyStore error, will wait and retry", ex);
      sleepRandomAmount();
      return decryptInternal(ciphertext, associatedData);
    }
  }
An {@link Aead} that does AES-GCM encryption with a key stored in <a
href="https://developer.android.com/training/articles/keystore.html">Android Keystore</a>.

<p>This class requires Android M (API level 23) or newer.

@since 1.0.0
java_src/src/main/java/com/google/crypto/tink/integration/android/AndroidKeystoreAesGcm.java