for example this ```private fun generateMac(someU...
# coroutines
u
for example this
Copy code
private fun generateMac(someUuid: String, base16HexStringKey: String): String {
        val uuidIdBytes = someUuid.toByteArray(UTF_8)
        val keyBytes = base16HexStringKey.toHexByteArray().decodeBase16()

        return hmacSha512(uuidIdBytes, keyBytes).encodeBase16().toHexString()
    }
It just generates hmac of some uuid string ... worth suspending?
u
how would you make this suspend?
u
I dont know, since its not cancelable, maybe thats the rule of the thumb?
u
yes. if it is asnychronous make it suspend. if it is blocking it is blocking - you can only put it on a background thread in case it takes a relevant amount of time
i.e. if you need to free up the (main?)thread