You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val keyString = "0c60ae04fbb17fe36f4e84631a5b8f3cd6d0cd46e80056bdfec97fd305f764daadef8ae1adc89b203043d7e2af1fb341df0ce5f66dfe3204ec3a9831532a8e4c"
val key = Cryptography.Instance.hmac.keyDecoder(SHA512).decodeFromByteString(HMAC.Key.Format.RAW, keyString.hexToByteString())
val signature = "5159e5bcdb6396a4453998ab477028f2103876bd4086855b7b04eb0ca57c3ac262c3fe38414971e53aef5ac094731b629de94afc2f6381d3dc6bec70f58cba73"
var resultString = "no exception"
var result = false
try {
result = key
.signatureVerifier()
// .verifySignature(byteArrayOf(1,2,3), signature.hexToByteArray()) // << this line
.tryVerifySignature(byteArrayOf(1,2,3), signature.hexToByteArray())
} catch (e: Exception) {
resultString = e.message.toString() + "\n" + e::class.qualifiedName
}
it feels verifySignature calls non-suspend method, thus webcrypto complains. tryVerifySignature is working
The same behavior observed for esdsa.
The text was updated successfully, but these errors were encountered:
it feels verifySignature calls non-suspend method, thus webcrypto complains. tryVerifySignature is working
The same behavior observed for esdsa.
The text was updated successfully, but these errors were encountered: