https://kotlinlang.org logo
#random
Title
# random
c

Colton Idle

03/08/2024, 12:51 AM
I'm trying to use bouncycastle for kotlin. I kinda feel like an idiot because i can't find what dependency i should drop into my build.gradle. lol. just me? https://github.com/bcgit/bc-kotlin
e

ephemient

03/08/2024, 5:44 AM
it isn't published. also I don't think it has kept up with bouncycastle anyway
s

Stefan Oltmann

03/08/2024, 5:49 AM
BouncyCastle was great back in the old Java days, but is now a bit out of touch. Did you check if https://github.com/whyoleg/cryptography-kotlin may offer what you need?
e

ephemient

03/08/2024, 5:51 AM
partly it's an artifact of its time, yes (back then it was illegal to export anything being basic crypto from the US)
but nowadays you can find the main products of BC in Maven Central
not this limited Kotlin DSL though
s

Stefan Oltmann

03/08/2024, 5:55 AM
Good they made their way to Maven Central. May previous product (Java) used (and still uses) BouncyCastle for X.509 certs for many years. It’s a great lib. But I felt to look for KMP after something that’s more from the ground up made for Kotlin.
e

ephemient

03/08/2024, 6:37 AM
yep. if you're on Java you're likely interoperating with JCA (which bouncycastle ties into) so you might as well use those types and not some Kotlin wrapper around a subset. or if you don't need to touch JCA, then use something like Tink for a better and maintained interface to crypto. if you're on multiplatform then BC isn't an option anyway.
👍 1
c

Colton Idle

03/08/2024, 3:12 PM
Tink has been decent to work with... but its proprietary wire formats are killing me.
Like Tink <> Tink is great. but tink java <> ios crypto lib has been terrible.
13 Views