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

Tobi

04/14/2019, 8:14 PM
Hey folks, I am currently working on a multiplatform library including some hashing and need to migrate a hmac-sha-256 function to pure kotlin. Any suggestions on how to this? Could I use KHash (https://github.com/komputing/KHash) to do that? cc @Riccardo Montagnin
o

olonho

04/14/2019, 8:28 PM
Not sure if pure Kotlin hashing is a good idea, if performance is important. I’d suggest interoping with high performance implementation on the platform
t

Tobi

04/15/2019, 6:31 AM
Thanks, performance is not an issue, but I am gonna also have a look into platform implementations 👍
r

Riccardo Montagnin

04/18/2019, 5:01 AM
KHash provides you with
sha256
module which contains a SHA-256 implementation in pure Kotlin. If you need to perform that kind of operation, you can use it 😁
36 Views