forked from sergeych/crypto2
15 lines
282 B
Kotlin
15 lines
282 B
Kotlin
package net.sergeych.crypto2
|
|
|
|
interface KeyInstance {
|
|
val id: KeyId
|
|
}
|
|
|
|
/**
|
|
* Create a new instance of the corresponding key.
|
|
*/
|
|
@Suppress("unused")
|
|
fun KeyInstance.toUniversalKey(): UniversalKey {
|
|
if (this is UniversalKey) return this
|
|
return UniversalKey.from(this)
|
|
}
|