All Downloads are FREE. Search and download functionalities are using the official Maven repository.

app.cash.trifle.testing.TestEndEntity.kt Maven / Gradle / Ivy

package app.cash.trifle.testing

import app.cash.trifle.Certificate
import app.cash.trifle.CertificateRequest
import app.cash.trifle.SignedData
import app.cash.trifle.Trifle

/**
 * Trifle End Entity used strictly for testing.
 */
data class TestEndEntity internal constructor(
  private val endEntity: Trifle.EndEntity,
  val certChain: List,
  val certRequest: CertificateRequest,
  val certificate: Certificate = certChain.first()
) {
  fun createSignedData(
    data: ByteArray,
    certChain: List = emptyList()
  ): SignedData = endEntity.createSignedData(data, certChain.ifEmpty { this.certChain })
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy