Use EncryptedSharedPreferences for HMAC key storage

Replace plain-text SharedPreferences with AES256-GCM encrypted prefs
via androidx.security:security-crypto. Adds PrefsHelper utility to
centralize encrypted prefs access across MainActivity, SettingsActivity
and UsbKeyReceiver.

Reviewed in codereview.md (recommendation #2).
This commit is contained in:
eddy 2026-07-26 16:09:10 +02:00
commit b5d42d53ba
5 changed files with 42 additions and 10 deletions

View file

@ -42,4 +42,5 @@ dependencies {
implementation 'io.github.dkaukov:esp32-flash-lib:1.1.17'
implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5'
implementation 'org.slf4j:slf4j-nop:2.0.16'
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
}