You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+32-32Lines changed: 32 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,63 +5,63 @@ All notable changes to this project will be documented in this file.
5
5
## [1.1.0] - 2025-06-11
6
6
7
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))
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/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/safebox/issues/12))
10
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))
11
+
-**SafeBoxBlobFileRegistry**: Prevents multiple SafeBox instances from accessing the same file simultaneously, resolving potential file channel conflicts. ([#10](https://github.com/harrytmthy/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/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/safebox/issues/25))
14
+
-**SafeBoxMigrationHelper**: Migrate from `EncryptedSharedPreferences` using standard `SharedPreferences` API. ([#13](https://github.com/harrytmthy/safebox/pull/13))
15
15
16
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))
17
+
-**ChaCha20CipherProvider**: Now backed by `CipherPool` for thread-safe encryption and decryption. ([#25](https://github.com/harrytmthy/safebox/issues/25))
18
+
-**SafeSecretKey**: Rewritten for concurrency using short-lived heap caches and reduced synchronized scope. ([#26](https://github.com/harrytmthy/safebox/issues/26))
19
+
-**SecureRandomKeyProvider**: Improved concurrency behavior when retrieving or decrypting keys. ([#26](https://github.com/harrytmthy/safebox/issues/26))
20
+
-**BouncyCastleProvider**: Lazy-injected only when ChaCha20 isn't available, preserving host app provider configs. ([#1](https://github.com/harrytmthy/safebox/issues/1))
21
+
-**compileSdkVersion** bumped to `36`. ([#2](https://github.com/harrytmthy/safebox/issues/2))
22
22
23
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))
-**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/safebox/issues/23))
- 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))
28
+
- Added **v1.1.0 benchmark results** showing faster performance across `get()`, `put()`, and `commit()` operations. ([#35](https://github.com/harrytmthy/safebox/issues/35))
29
+
- Enabled [**GitHub Sponsors**](https://github.com/sponsors/harrytmthy) with the new `Support SafeBox` section. ([#37](https://github.com/harrytmthy/safebox/issues/37))
30
+
- Added project metadata badges: Build, License, and Version. ([#39](https://github.com/harrytmthy/safebox/issues/39))
31
31
32
32
## [1.1.0-rc01] - 2025-06-09
33
33
34
34
### Added
35
-
-**CipherPool**: A coroutine-friendly, thread-safe pool for reusing `Cipher` instances across threads, backed by a load-factor-based expansion strategy. Prevents cryptographic race conditions in read-heavy workloads. ([#25](https://github.com/harrytmthy-dev/safebox/issues/25))
36
-
-**SafeBoxExecutor**: Internal singleton executor to support background concurrency operations like CipherPool scaling. Publicly reusable for custom extensions. ([#30](https://github.com/harrytmthy-dev/safebox/pull/30))
35
+
-**CipherPool**: A coroutine-friendly, thread-safe pool for reusing `Cipher` instances across threads, backed by a load-factor-based expansion strategy. Prevents cryptographic race conditions in read-heavy workloads. ([#25](https://github.com/harrytmthy/safebox/issues/25))
36
+
-**SafeBoxExecutor**: Internal singleton executor to support background concurrency operations like CipherPool scaling. Publicly reusable for custom extensions. ([#30](https://github.com/harrytmthy/safebox/pull/30))
37
37
38
38
### Changed
39
-
-**ChaCha20CipherProvider** now uses `CipherPool` for safe concurrent encryption/decryption. ([#25](https://github.com/harrytmthy-dev/safebox/issues/25))
40
-
-**SafeSecretKey**: Now supports concurrent access by reducing synchronized scope, caching the unmasked key in a short-lived atomic heap reference. ([#26](https://github.com/harrytmthy-dev/safebox/issues/26))
41
-
-**SecureRandomKeyProvider**: Key caching and unmasking now support concurrent access patterns without blocking parallel threads. ([#26](https://github.com/harrytmthy-dev/safebox/issues/26))
42
-
-**BouncyCastle provider initialization** is now safer and more flexible: `CipherPool` lazily injects the provider only when ChaCha20 is not available, reducing the risk of overwriting external configurations. ([#1](https://github.com/harrytmthy-dev/safebox/issues/1))
43
-
-**compileSdk bumped to 36**: Ensure SafeBox stays forward-compatible with the latest Android APIs. ([#2](https://github.com/harrytmthy-dev/safebox/issues/2))
39
+
-**ChaCha20CipherProvider** now uses `CipherPool` for safe concurrent encryption/decryption. ([#25](https://github.com/harrytmthy/safebox/issues/25))
40
+
-**SafeSecretKey**: Now supports concurrent access by reducing synchronized scope, caching the unmasked key in a short-lived atomic heap reference. ([#26](https://github.com/harrytmthy/safebox/issues/26))
41
+
-**SecureRandomKeyProvider**: Key caching and unmasking now support concurrent access patterns without blocking parallel threads. ([#26](https://github.com/harrytmthy/safebox/issues/26))
42
+
-**BouncyCastle provider initialization** is now safer and more flexible: `CipherPool` lazily injects the provider only when ChaCha20 is not available, reducing the risk of overwriting external configurations. ([#1](https://github.com/harrytmthy/safebox/issues/1))
43
+
-**compileSdk bumped to 36**: Ensure SafeBox stays forward-compatible with the latest Android APIs. ([#2](https://github.com/harrytmthy/safebox/issues/2))
44
44
45
45
### Security
46
-
-**XOR-based in-memory masking** added to `SafeSecretKey`, preventing runtime memory inspection of the raw DEK. The key is stored in masked form using a SHA-256 hash of the encrypted DEK as its mask. ([#23](https://github.com/harrytmthy-dev/safebox/issues/23))
47
-
-**On-demand Cipher creation** for `AesGcmCipherProvider`, eliminating long-lived `Cipher` references that may retain sensitive key material. ([#28](https://github.com/harrytmthy-dev/safebox/issues/28))
46
+
-**XOR-based in-memory masking** added to `SafeSecretKey`, preventing runtime memory inspection of the raw DEK. The key is stored in masked form using a SHA-256 hash of the encrypted DEK as its mask. ([#23](https://github.com/harrytmthy/safebox/issues/23))
47
+
-**On-demand Cipher creation** for `AesGcmCipherProvider`, eliminating long-lived `Cipher` references that may retain sensitive key material. ([#28](https://github.com/harrytmthy/safebox/issues/28))
48
48
49
49
## [1.1.0-beta01] - 2025-06-04
50
50
51
51
### Added
52
-
-**SafeBoxStateManager** is now the sole authority over lifecycle states (`STARTING`, `WRITING`, `IDLE`, `CLOSED`). It tracks concurrent edits, coordinates safe apply/commit transitions, and guarantees deterministic closure in `closeWhenIdle()`. ([#17](https://github.com/harrytmthy-dev/safebox/issues/17))
53
-
-**Write guard after closure:** Once `SafeBox` transitions to `CLOSED`, all subsequent write operations (`apply()` or `commit()`) are safely blocked. Prevents late `WRITING` emissions and ensures lifecycle integrity. ([#19](https://github.com/harrytmthy-dev/safebox/issues/19))
52
+
-**SafeBoxStateManager** is now the sole authority over lifecycle states (`STARTING`, `WRITING`, `IDLE`, `CLOSED`). It tracks concurrent edits, coordinates safe apply/commit transitions, and guarantees deterministic closure in `closeWhenIdle()`. ([#17](https://github.com/harrytmthy/safebox/issues/17))
53
+
-**Write guard after closure:** Once `SafeBox` transitions to `CLOSED`, all subsequent write operations (`apply()` or `commit()`) are safely blocked. Prevents late `WRITING` emissions and ensures lifecycle integrity. ([#19](https://github.com/harrytmthy/safebox/issues/19))
54
54
55
55
### Fixed
56
-
- GPG signing and secret injection issues in the Maven publish pipeline, resolving deployment failure from alpha02. ([PR #16](https://github.com/harrytmthy-dev/safebox/pull/16))
56
+
- GPG signing and secret injection issues in the Maven publish pipeline, resolving deployment failure from alpha02. ([PR #16](https://github.com/harrytmthy/safebox/pull/16))
57
57
58
58
## [1.1.0-alpha02] - 2025-06-02
59
59
60
60
### Added
61
-
-**SafeBoxBlobFileRegistry** prevents multiple `SafeBox` instances from accessing the same blob file. This enforces a **single-instance-per-file** constraint internally, resolving the risk documented in [#3](https://github.com/harrytmthy-dev/safebox/issues/3). ([#10](https://github.com/harrytmthy-dev/safebox/issues/10))
62
-
-**SafeBoxStateListener** for tracking `SafeBox` lifecycle states (`STARTING`, `IDLE`, `WRITING`, `CLOSED`). It can be attached per-instance via `SafeBox.create(...)` or registered globally via `SafeBoxGlobalStateObserver`. ([#12](https://github.com/harrytmthy-dev/safebox/issues/12))
63
-
-**SafeBoxGlobalStateObserver** tracks `SafeBox` state transitions by file name, with support for multiple listeners. ([#12](https://github.com/harrytmthy-dev/safebox/issues/12))
64
-
-`SafeBox#closeWhenIdle()` defers closure until all pending writes are complete, preventing premature teardown in async environments. ([#12](https://github.com/harrytmthy-dev/safebox/issues/12))
61
+
-**SafeBoxBlobFileRegistry** prevents multiple `SafeBox` instances from accessing the same blob file. This enforces a **single-instance-per-file** constraint internally, resolving the risk documented in [#3](https://github.com/harrytmthy/safebox/issues/3). ([#10](https://github.com/harrytmthy/safebox/issues/10))
62
+
-**SafeBoxStateListener** for tracking `SafeBox` lifecycle states (`STARTING`, `IDLE`, `WRITING`, `CLOSED`). It can be attached per-instance via `SafeBox.create(...)` or registered globally via `SafeBoxGlobalStateObserver`. ([#12](https://github.com/harrytmthy/safebox/issues/12))
63
+
-**SafeBoxGlobalStateObserver** tracks `SafeBox` state transitions by file name, with support for multiple listeners. ([#12](https://github.com/harrytmthy/safebox/issues/12))
64
+
-`SafeBox#closeWhenIdle()` defers closure until all pending writes are complete, preventing premature teardown in async environments. ([#12](https://github.com/harrytmthy/safebox/issues/12))
65
65
66
66
### Behavior Changes
67
67
- Calling `SafeBox.create(...)` before closing the existing instance with the same file name now throws `IllegalStateException`.
The `io.github.harrytmthy-dev` namespace is now **deprecated**. Starting from `v1.2.0-alpha01`, SafeBox will be published under the canonical Maven group `io.github.harrytmthy`.
63
+
64
+
Please update your dependencies accordingly.
65
+
60
66
## Basic Usage
61
67
62
68
First, provide SafeBox as a singleton:
@@ -251,7 +257,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, formatting, testing, and PR gu
251
257
252
258
If SafeBox helped secure your app or saved your time, consider sponsoring to support future improvements and maintenance!
0 commit comments