/*
 * Copyright 2025 Signal Messenger, LLC
 * SPDX-License-Identifier: AGPL-3.0-only
 */

package org.signal.glide.decryptableuri

import android.net.Uri
import com.bumptech.glide.load.Key
import java.security.MessageDigest

data class DecryptableUri @JvmOverloads constructor(val uri: Uri, val thumbnailTimeUs: Long = 0) : Key {
  override fun updateDiskCacheKey(messageDigest: MessageDigest) {
    messageDigest.update(uri.toString().toByteArray())
    messageDigest.update(thumbnailTimeUs.toString().toByteArray())
  }
}
