ehn-dcc-development / hcert-kotlin

Kotlin multiplatform implementation of the HCERT/DCC specification
Apache License 2.0
25 stars 25 forks source link

SignedData Verifier #50

Closed nodh closed 3 years ago

nodh commented 3 years ago

Add services for apps to create and verify signed data objects, i.e. trust lists, value sets and business rules. This extends the format previously used for the trust list, i.e. a CBOR encoded content blob and a detached COSE signature blob.

nodh commented 3 years ago

Why not typealias ContentAndSignature = Pair<ByteArray,Bbytearray>? and two delegated extension properties (on that specific type alias)? Saves custom equals and hashCode…

Because then one wouldn't know if first is the content, or first is the signature, right?

JesusMcCloud commented 3 years ago

was thinking about something like this:

typealias SignedData = Pair<ByteArray,ByteArray>
val SignedData.content: ByteArray get() = this.first
val SignedData.signature: ByteArray get() = this.second