https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

Thanh nguyen

03/14/2024, 4:48 AM
Copy code
fun verifyData(text: String?, signature: String?): Boolean {
        return try {
            val signClient = Signature.getInstance("SHA256withRSA")
            signClient.initVerify(Key.rsaPublicKey())
            signClient.update(Base64.decode(text))
            signClient.verify(Base64.decode(signature))
        } catch (e: Exception) {
            false
        }
    }
Can I convert verifySignature rsa sha256 to kotlin iosMain ?