Skip to content

Commit

Permalink
ios actual keyword fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
curtis-h committed Jul 20, 2023
1 parent c960f28 commit 325a519
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ actual class KMMEdKeyPair actual constructor(
}

@Throws(RuntimeException::class)
public fun sign(message: ByteArray): ByteArray {
actual fun sign(message: ByteArray): ByteArray {
return privateKey.sign(message)
}

@Throws(RuntimeException::class)
public fun verify(message: ByteArray, sig: ByteArray): Boolean {
actual fun verify(message: ByteArray, sig: ByteArray): Boolean {
return publicKey.verify(message, sig)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import platform.Foundation.NSError
public actual class KMMEdPrivateKey(val raw: ByteArray = Ed25519.createPrivateKey().toByteArray()) {

@Throws(RuntimeException::class)
public fun sign(message: ByteArray): ByteArray {
actual fun sign(message: ByteArray): ByteArray {
memScoped {
val errorRef = alloc<ObjCObjectVar<NSError?>>()
val result = Ed25519.signWithPrivateKey(raw.toNSData(), message.toNSData(), errorRef.ptr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import platform.Foundation.NSError
public actual class KMMEdPublicKey(val raw: ByteArray) {

@Throws(RuntimeException::class)
public fun verify(message: ByteArray, sig: ByteArray): Boolean {
actual fun verify(message: ByteArray, sig: ByteArray): Boolean {
memScoped {
val errorRef = alloc<ObjCObjectVar<NSError?>>()
val result = Ed25519.verifyWithPublicKey(raw.toNSData(), sig.toNSData(), message.toNSData(), errorRef.ptr)
Expand Down

0 comments on commit 325a519

Please sign in to comment.