Skip to content

Commit a5f8aca

Browse files
authored
release: v1.1.0 with improved state management, security, and concurrency (#41)
1 parent dcb3635 commit a5f8aca

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.0] - 2025-06-11
6+
7+
### Added
8+
- **SafeBoxStateManager**: A centralized lifecycle controller that manages `STARTING`, `WRITING`, `IDLE`, and `CLOSED` states per SafeBox instance. It tracks concurrent edits and ensures deterministic closure via `closeWhenIdle()`. ([#17](https://github.com/harrytmthy-dev/safebox/issues/17))
9+
- **SafeBoxGlobalStateObserver**: Observes SafeBox state transitions globally by file name. Useful for debugging or monitoring multiple files. ([#12](https://github.com/harrytmthy-dev/safebox/issues/12))
10+
- **SafeBoxStateListener**: Per-instance listener for tracking lifecycle changes.
11+
- **SafeBoxBlobFileRegistry**: Prevents multiple SafeBox instances from accessing the same file simultaneously, resolving potential file channel conflicts. ([#10](https://github.com/harrytmthy-dev/safebox/issues/10))
12+
- **SafeBoxExecutor**: Internal single-thread executor that supports background crypto operations and is publicly reusable for extensions. ([#30](https://github.com/harrytmthy-dev/safebox/pull/30))
13+
- **CipherPool**: A coroutine-friendly pool for reusing `Cipher` instances across threads. Helps prevent race conditions and improves crypto throughput. ([#25](https://github.com/harrytmthy-dev/safebox/issues/25))
14+
- **SafeBoxMigrationHelper**: Migrate from `EncryptedSharedPreferences` using standard `SharedPreferences` API. ([#13](https://github.com/harrytmthy-dev/safebox/pull/13))
15+
16+
### Changed
17+
- **ChaCha20CipherProvider**: Now backed by `CipherPool` for thread-safe encryption and decryption. ([#25](https://github.com/harrytmthy-dev/safebox/issues/25))
18+
- **SafeSecretKey**: Rewritten for concurrency using short-lived heap caches and reduced synchronized scope. ([#26](https://github.com/harrytmthy-dev/safebox/issues/26))
19+
- **SecureRandomKeyProvider**: Improved concurrency behavior when retrieving or decrypting keys. ([#26](https://github.com/harrytmthy-dev/safebox/issues/26))
20+
- **BouncyCastleProvider**: Lazy-injected only when ChaCha20 isn't available, preserving host app provider configs. ([#1](https://github.com/harrytmthy-dev/safebox/issues/1))
21+
- **compileSdkVersion** bumped to `36`. ([#2](https://github.com/harrytmthy-dev/safebox/issues/2))
22+
23+
### Security
24+
- **XOR-based key masking**: `SafeSecretKey` is now masked in memory using a SHA-256-derived mask. Prevents native memory inspection of raw DEK. ([#23](https://github.com/harrytmthy-dev/safebox/issues/23))
25+
- **On-demand cipher creation**: `AesGcmCipherProvider` no longer holds long-lived `Cipher` instances. ([#28](https://github.com/harrytmthy-dev/safebox/issues/28))
26+
27+
### Docs
28+
- Added **v1.1.0 benchmark results** showing faster performance across `get()`, `put()`, and `commit()` operations. ([#35](https://github.com/harrytmthy-dev/safebox/issues/35))
29+
- Enabled [**GitHub Sponsors**](https://github.com/sponsors/harrytmthy-dev) with the new `Support SafeBox` section. ([#37](https://github.com/harrytmthy-dev/safebox/issues/37))
30+
- Added project metadata badges: Build, License, and Version. ([#39](https://github.com/harrytmthy-dev/safebox/issues/39))
31+
532
## [1.1.0-rc01] - 2025-06-09
633

734
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Compared to EncryptedSharedPreferences:
5353

5454
```kotlin
5555
dependencies {
56-
implementation("io.github.harrytmthy-dev:safebox:1.1.0-rc01")
56+
implementation("io.github.harrytmthy-dev:safebox:1.1.0")
5757
}
5858
```
5959

safebox/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
}
2424

2525
group = "io.github.harrytmthy-dev"
26-
version = "1.1.0-rc01"
26+
version = "1.1.0"
2727

2828
android {
2929
namespace = "com.harrytmthy.safebox"

0 commit comments

Comments
 (0)