whyoleg / cryptography-kotlin

Kotlin Multiplatform cryptography / crypto library
https://whyoleg.github.io/cryptography-kotlin/
Apache License 2.0
343 stars 20 forks source link

Overload resolution ambiguity for keyGenerator #53

Open eygraber opened 3 weeks ago

eygraber commented 3 weeks ago

With 0.4.0 using AES.keyGenerator with the default arguments results in Overload resolution ambiguity between the correct function and the deprecated one. Perhaps DeprecationLevel.HIDDEN should be used?

whyoleg commented 3 weeks ago

ooh, that's an unfortunate issue, thanks for reporting it! Probably it was needed to remove keyGenerator(SymmetricKeySize) default parameter...

Perhaps DeprecationLevel.HIDDEN should be used?

yeah, that's an option, though with HIDDEN you don't have automatic replacements by IDE and so HIDDEN is more about saving on binary compatibility and doesn't help with migration here. Anyway, I would like to drop all declarations deprecated with ERROR in 0.5.0, so to be able to evolve quickly until 1.0.0.

I will see what could be done here in a compatible way and probably will release 0.4.1 with the fix for this.