?
Background: I’m working on a Kmp library where we need to use OS’s crypto API to encrypt data. So, in Kmp library we define an Interface
Copy code
interface MessagePackHelper {
fun serialize(payload: String): ByteArray
}
from iOS, we need to implement this interface and set back to the Kmp library. So in Swift, we need to implement below method:
Copy code
func serialize(payload: String) -> KotlinByteArray {
// let encyrpted = encrypt(payload) // result is NSData obect
// todo - would like to convert NSData -> KotlinByteArray
}