-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e56dd72
commit 8e1355c
Showing
9 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...n/kotlin/co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/KeyPair.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
actual typealias KeyPair = java.security.KeyPair |
3 changes: 3 additions & 0 deletions
3
.../kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/PlatformBinaryData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
actual typealias PlatformBinaryData = kotlin.ByteArray |
6 changes: 6 additions & 0 deletions
6
...n/kotlin/co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/Cryptor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
interface Cryptor { | ||
fun encrypt() | ||
fun decrypt() | ||
} |
8 changes: 8 additions & 0 deletions
8
...co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/DigitalSignature.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
interface DigitalSignature { | ||
fun sign(alias: String, data: ByteArray): PlatformBinaryData | ||
|
||
// When receiving data, it is always received as something like Ktor, so this is sufficient as [ByteArray]. | ||
fun verify(alias: String, data: ByteArray): Boolean | ||
} |
4 changes: 4 additions & 0 deletions
4
...n/kotlin/co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/KeyPair.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
// TODO: Always catch up and migrate if it can be implemented only with Kotlin libraries. | ||
expect class KeyPair |
7 changes: 7 additions & 0 deletions
7
...n/co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/KeyPairHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
interface KeyPairHandler { | ||
fun generateKeyPair(alias: String): KeyPair | ||
fun obtainKeyPair(alias: String): KeyPair? | ||
fun deleteKeyPair(alias: String): Boolean | ||
} |
4 changes: 4 additions & 0 deletions
4
.../kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/PlatformBinaryData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
// TODO: Always catch up and migrate if it can be implemented only with Kotlin libraries. | ||
expect class PlatformBinaryData |
8 changes: 8 additions & 0 deletions
8
...n/kotlin/co/kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/KeyPair.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
import kotlinx.cinterop.ExperimentalForeignApi | ||
|
||
actual typealias KeyPair = IosKeyPair | ||
|
||
@OptIn(ExperimentalForeignApi::class) | ||
class IosKeyPair(val secKeyRef: platform.Security.SecKeyRef) |
3 changes: 3 additions & 0 deletions
3
.../kr/parkjonghun/composemultiplatformtestairfield/infrastructure/key/PlatformBinaryData.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package co.kr.parkjonghun.composemultiplatformtestairfield.infrastructure.key | ||
|
||
actual typealias PlatformBinaryData = platform.Foundation.NSData |