- Updates
kotlinto2.2.20[#127] - Updates
kotlincrypto.errorto0.4.0[#127] - Lower supported
KotlinVersionto1.8[#128]
- Updates
kotlinto2.2.10[#126] - Updates
kotlincrypto.errorto0.3.1
- Updates
kotlinto2.1.10[#122] - Updates
kotlincrypto.errorto0.3.0[#122] MacandDigestconstructors now throwInvalidParameterExceptioninstead ofIllegalArgumentException[#124]Mac.Engineconstructor,Mac.reset(newKey), andXof.Companion.reset(newKey)now throwInvalidKeyExceptioninstead ofIllegalArgumentException[#124]
- Adds
Digest.digestIntoAPI for populating an existingByteArraywith output [#108] - Adds
Mac.doFinalIntoAPI for populating an existingByteArraywith output [#109] - Adds
Mac.Engine.resetOnDoFinalconstructor argument for providing implementations the ability to disable automaticEngine.resetcall whendoFinalordoFinalIntogets executed [#111]- Mitigates double resets when implementation is backed by a
Digest.
- Mitigates double resets when implementation is backed by a
- Adds
dokkadocumentation athttps://core.kotlincrypto.org[#116] - Adds API dependency
org.kotlincrypto:errorto modulecore[#118]
@Throwsannotation removed fromUpdatable.update(it is documented).- Finalizes
Digestinternal API and removesInternalKotlinCryptoApiopt-in requirement from constructors.- Drops usage of
DigestStatein favor of secondary constructor which takesDigestas an argument (forcopyfunction implementations). Copyable.copyoverride is now passed through to implementations so that the proper return type can be defined (instead of requiring API consumers to cast fromDigest).protectedfunctions renamed:compress>>compressProtecteddigest>>digestProtectedupdateDigest>>updateProtectedresetDigest>>resetProtected
digestProtected(previouslydigest) now only provides the buffered input and position as arguments;bitLengthis no longer tracked byDigest.
- Drops usage of
Digest.digestnow zero's out stale buffered input frombufPostobuf.sizebefore passing it todigestProtected(previouslydigest) as an argument.- Finalizes
Macinternal API and removesInternalKotlinCryptoApiopt-in requirement from constructors.- Provides secondary constructor which takes
Macas an argument (forcopyfunction implementations). Copyable.copyoverride is now passed through toMacimplementations so that the proper return type can be defined (instead of requiring API consumers to cast fromMac).- Adds ability to reinitialize
Macwith a newkeyparameter viareset(newKey)(or clear it after use). - Adds
Mac.clearKeyhelper function for zeroing out key material before dereferencing theMac(if desired). - Removes
Mac.Engine.Statein favor of secondary constructor which takesMac.Engineas an argument (forcopyfunction implementation). - Adds abstract function
Mac.Engine.reset(newKey)for reinitialization functionality.
- Provides secondary constructor which takes
- Finalizes
XofandXofFactoryinternal API and removesInternalKotlinCryptoApiopt-in requirement from constructors.Xof.Reader.readProtectedno longer passesbytesReadas an argument.
- Adds
ReKeyableXofAlgorithminterface forXofimplementations who's backing delegate is aMac. - Adds
Xof.Companion.reset(newKey)extension function which allows API consumers the ability to reinitialize theXofwith a newkeyparameter when thatXofis backed by an instance ofReKeyableXofAlgorithm(i.e. aMacimplementation). Xof.useandXof.Reader.usefunctions are now inlined.- Removes usage of
KotlinCrypto.endianslibrary (deprecated) fromXof.Utils.
- Fixes optimization issues with
Digest.updateinternals [#70]
- Adds benchmarking to repository [#64]
- Refactors
Digestinternals (performance improvements) [#66] - Changes module
:commonname to:coreto be more in line with its package name oforg.kotlincrypto.core- Publication coordinates have changed from
org.kotlincrypto.core:commontoorg.kotlincrypto.core:core
- Publication coordinates have changed from
- Updates
kotlinto1.9.24[#61] - Updates
endiansto0.3.1[#61] - Fixes multiplatform metadata manifest
unique_nameparameter for all source sets to be truly unique. [#61] - Updates jvm
.kotlin_modulewith truly unique file name. [#61]
- Use
transitivekeyword forJPMSmodule-info.javafiles [#58]
- Updates
kotlinto1.9.23[#55] - Updates
endiansto0.3.0[#55] - Add experimental support for
wasmJs&wasmWasi[#55] - Add support for Java9
JPMSvia Multi-Release jar [#56]
- Adds check for Android Runtime to
KC_ANDROID_SDK_INT[#51]- Android Unit Tests:
KC_ANDROID_SDK_INTwill now benull - Android Runtime:
KC_ANDROID_SDK_INTwill NOT benull
- Android Unit Tests:
- Updates
kotlinto1.9.21[#52] - Updates
endiansto0.2.0[#52] - Drops support for the following deprecated targets:
iosArm32watchosX86linuxArm32HfplinuxMips32linuxMipsel32mingwX86wasm32
- Fixes JPMS split packages [#48]
- API BREAKING CHANGES
- Package names were changed for
digest,mac, andxofdependencies - Example:
org.kotlincrypto.core.Digestwas moved toorg.kotlincrypto.core.digest.Digestorg.kotlincrypto.core.Macwas moved toorg.kotlincrypto.core.mac.Macorg.kotlincrypto.core.Xofwas moved toorg.kotlincrypto.core.xof.Xof
- See the ANNOUNCEMENT for more information on
0.3.0release
- Fixes Android API 23 and below not calling
javax.crypto.MacSpi.engineResetwheneverjavax.crypto.Mac.doFinalis invoked [#46]
- Fixes Android API 21-23 requiring a
Providerin order to setjavax.crypto.Mac.spiImplwhenjavax.crypto.Mac.initis invoked [#44] - Throw
InvalidKeyExceptionifjavax.crypto.Mac.initis invoked [#43]- All
org.kotlincrypto.core.MacAPIs are structured such that implementations always require a key as a constructor argument and are initialized immediately. As such, if a java caller attempts to re-initialize thejavax.crypto.Macwith a different key they may assume future output produced is using the new key. This is not the case asKotlin Cryptodoes not use a provider based architecture. A new, uninitializedMaccannot be created. - Note that
Mac.initis not available fromcommonMain. It is a remnant of bad API design requiring ability to lazily initialize things whichKotlin Cryptowill never support as it leads to monolithic structures, instead of building on good abstractions. IfMac.initis required to be called, a wholly new instance of theorg.kotlincrypto.core.Macimplementation needs to be instantiated with the new key.
- All
- Fixes Android API 23 and below not accepting
nullforMac.initkey parameter [#38] - Updates
kotlinto1.8.21[#40]
- Adds
Digest.updateDigestprotected open functions for implementors to override when needing access to input before it is buffered [#34] - Adds input argument check for nonJvm
Mac.updatewhenoffsetandlenparameters are specified [#35] - Updates
Digest.digestLengthconstructor argument check to now accept 0 as a valid length [#36]- Previously, passing 0 would throw an
IllegalArgumentException.
- Previously, passing 0 would throw an
- Fix
nonJvmMac.doFinalnot callingengine.reset()[#27]- Only implementation of
MacisHmacviaMACsrepo, which is unaffected by this issue.
- Only implementation of
- Adds
XofAlgorithminterface [#29]
- Adds abstraction for
XOFs (Extendable-Output Functions) [#25]
- BREAKING CHANGE:
Digest.compressfunction was changed to also include an offset. This drastically improves performance by mitigating excessive/unnecessary array copying. [#21]
- Fix
Digest.updatemiscalculation whenoffsetparameter is provided [#16] - Fix
jvmDigest.algorithm()StackOverflow error [#12]
- Initial Release