Skip to content

Commit ab8d6de

Browse files
committed
Prepare 0.6.1 release
1 parent 3f7c251 commit ab8d6de

File tree

7 files changed

+29
-16
lines changed

7 files changed

+29
-16
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGELOG
22

3+
## Version 0.6.1 (2025-02-09)
4+
- Adds `Digest.digestInto` API for populating an existing `ByteArray` with output [[#108]][108]
5+
- Adds `Mac.doFinalInto` API for populating an existing `ByteArray` with output [[#109]][109]
6+
- Adds `Mac.Engine.resetOnDoFinal` constructor argument for providing implementations the ability
7+
to disable automatic `Engine.reset` call when `doFinal` or `doFinalInto` gets executed [[#111]][111]
8+
- Mitigates double resets when implementation is backed by a `Digest`.
9+
- Adds `dokka` documentation at `https://core.kotlincrypto.org`
10+
- Adds API dependency `org.kotlincrypto.error:error` to module `core` [[#118]][118]
11+
312
## Version 0.6.0 (2025-01-15)
413
- `@Throws` annotation removed from `Updatable.update` (it is documented).
514
- Finalizes `Digest` internal API and removes `InternalKotlinCryptoApi` opt-in requirement from constructors.
@@ -172,3 +181,7 @@
172181
[64]: https://github.com/KotlinCrypto/core/pull/64
173182
[66]: https://github.com/KotlinCrypto/core/pull/66
174183
[70]: https://github.com/KotlinCrypto/core/pull/70
184+
[108]: https://github.com/KotlinCrypto/core/pull/108
185+
[109]: https://github.com/KotlinCrypto/core/pull/109
186+
[111]: https://github.com/KotlinCrypto/core/pull/111
187+
[118]: https://github.com/KotlinCrypto/core/pull/118

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ The best way to keep `KotlinCrypto` dependencies up to date is by using the
6868
```kotlin
6969
// build.gradle.kts
7070
dependencies {
71-
val core = "0.6.0"
71+
val core = "0.6.1"
7272
implementation("org.kotlincrypto.core:digest:$core")
7373
implementation("org.kotlincrypto.core:mac:$core")
7474
implementation("org.kotlincrypto.core:xof:$core")
7575
}
7676
```
7777

7878
<!-- TAG_VERSION -->
79-
[badge-latest-release]: https://img.shields.io/badge/latest--release-0.6.0-blue.svg?style=flat
79+
[badge-latest-release]: https://img.shields.io/badge/latest--release-0.6.1-blue.svg?style=flat
8080
[badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat
8181

8282
<!-- TAG_DEPENDENCIES -->

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ POM_DEVELOPER_ID=KotlinCrypto
3030
POM_DEVELOPER_NAME=Kotlin Crypto
3131
POM_DEVELOPER_URL=https://github.com/KotlinCrypto/
3232

33-
VERSION_NAME=0.6.1-SNAPSHOT
33+
VERSION_NAME=0.6.1
3434
# 0.1.0-alpha01 = 00 01 00 11
3535
# 0.1.0-beta01 = 00 01 00 21
3636
# 0.1.0-rc01 = 00 01 00 31

library/core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Module core
22

3-
Very small module, only containing public interfaces and exceptions. Is exported by all other modules.
3+
Very small module, only containing public interfaces and annotations. Is exported by all other modules.

library/digest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Implementations can be found at [KotlinCrypto/hash][url-hash]
66

77
```kotlin
8-
// Using SHA256 from hash repo as an example
8+
// Using SHA256 from KotlinCrypto/hash repo as an example
99
import org.kotlincrypto.hash.sha2.SHA256
1010

1111
fun main() {

library/mac/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
Implementations can be found at [KotlinCrypto/MACs][url-macs]
66

77
```kotlin
8-
// Using SecureRandom from the secure-random repo as an example
9-
import org.kotlincrypto.SecureRandom
10-
// Using HmacSHA3_256 from the MACs repo as an example
8+
// Using CryptoRand from KotlinCrypto/random repo as an example
9+
import org.kotlincrypto.random.CryptoRand
10+
// Using HmacSHA3_256 from KotlinCrypto/MACs repo as an example
1111
import org.kotlincrypto.macs.hmac.sha3.HmacSHA3_256
1212

1313
fun main() {
14-
val key = SecureRandom().nextBytesOf(100)
14+
val key = CryptoRand.Default.nextBytes(ByteArray(100))
1515
val mac = HmacSHA3_256(key)
1616
val bytes = Random.Default.nextBytes(615)
1717

@@ -40,7 +40,7 @@ fun main() {
4040

4141
// Reinitialize Mac instance with a new key
4242
// to use for something else.
43-
val newKey = SecureRandom().nextBytesOf(100)
43+
val newKey = CryptoRand.Default.nextBytes(ByteArray(100))
4444
mac.reset(newKey = newKey)
4545

4646
// Zero out key material before dereferencing

library/xof/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ different from those types, while implementing the same interfaces (`Algorithm`,
1313
Output for an `Xof` is done by reading, instead.
1414

1515
```kotlin
16-
// Using SHAKE128 from hash repo as an example
16+
// Using SHAKE128 from KotlinCrypto/hash repo as an example
1717
import org.kotlincrypto.hash.sha3.SHAKE128
1818

1919
fun main() {
@@ -82,19 +82,19 @@ fun main() {
8282
```
8383

8484
```kotlin
85-
// Using KMAC128 from MACs repo as an example
85+
// Using CryptoRand from KotlinCrypto/random repo as an example
86+
import org.kotlincrypto.random.CryptoRand
87+
// Using KMAC128 from KotlinCrypto/MACs repo as an example
8688
import org.kotlincrypto.macs.kmac.KMAC128
87-
// Using SecureRandom from the secure-random repo as an example
88-
import org.kotlincrypto.SecureRandom
8989

9090
fun main() {
91-
val key = SecureRandom().nextBytesOf(100)
91+
val key = CryptoRand.Default.nextBytes(ByteArray(100))
9292
val kmacXof: Xof<KMAC128> = KMAC128.xOf(key)
9393

9494
// If Xof is for a Mac that implements ReKeyableXofAlgorithm,
9595
// reinitialize the instance via the `Xof.Companion.reset`
9696
// extension function for reuse.
97-
val newKey = SecureRandom().nextBytesOf(100)
97+
val newKey = CryptoRand.Default.nextBytes(ByteArray(100))
9898
kmacXof.reset(newKey = newKey)
9999

100100
// Or zero out key material before dereferencing

0 commit comments

Comments
 (0)