Skip to content

Commit

Permalink
feat(KClass): support KClass interface
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuNen344 committed Apr 22, 2023
1 parent 48dc12a commit 722466c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tink/src/iosMain/kotlin/io/github/ryunen344/tink/util/KClass.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package io.github.ryunen344.tink.util

import io.github.ryunen344.tink.aead.Aead
import io.github.ryunen344.tink.daead.DeterministicAead
import io.github.ryunen344.tink.hybrid.HybridDecrypt
import io.github.ryunen344.tink.hybrid.HybridEncrypt
import io.github.ryunen344.tink.mac.Mac
import io.github.ryunen344.tink.signature.PublicKeySign
import io.github.ryunen344.tink.signature.PublicKeyVerify
import kotlin.reflect.KClass

val Aead.kclass: KClass<Aead>
get() = Aead::class

val DeterministicAead.kclass: KClass<DeterministicAead>
get() = DeterministicAead::class

val HybridDecrypt.kclass: KClass<HybridDecrypt>
get() = HybridDecrypt::class

val HybridEncrypt.kclass: KClass<HybridEncrypt>
get() = HybridEncrypt::class

val Mac.kclass: KClass<Mac>
get() = Mac::class

val PublicKeySign.kclass: KClass<PublicKeySign>
get() = PublicKeySign::class

val PublicKeyVerify.kclass: KClass<PublicKeyVerify>
get() = PublicKeyVerify::class

0 comments on commit 722466c

Please sign in to comment.