Download the PHP package projectmata/mobile-secure-storage without Composer
On this page you can find all versions of the php package projectmata/mobile-secure-storage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download projectmata/mobile-secure-storage
More information about projectmata/mobile-secure-storage
Files in projectmata/mobile-secure-storage
Package mobile-secure-storage
Short Description Custom secure storage plugin for NativePHP Mobile
License MIT
Informations about the package mobile-secure-storage
Projectmata Mobile Secure Storage
Encrypted key-value storage plugin for NativePHP Mobile. Backed by Android Keystore AES-GCM encryption and iOS Keychain.
Use it for API tokens, refresh tokens, small credentials, or any small string you don't want sitting in plain SharedPreferences / UserDefaults.
Requirements
- PHP
^8.1 - Laravel
^11.0or^12.0/^13.0 nativephp/mobile- Android:
min_version 33 - iOS:
min_version 18.2
Installation
Laravel auto-discovery registers the service provider and facade automatically.
Rebuild the mobile app so the native plugin is bundled:
Usage
PHP (Laravel)
JavaScript (in-app)
The plugin registers itself on window.NativePHP.SecureStorage:
Or as a bundled import:
Bridge methods
| Method | Params | Returns |
|---|---|---|
SecureStorage.SetItem |
{ key, value } |
{ success } |
SecureStorage.GetItem |
{ key } |
{ success, value \| null } |
SecureStorage.RemoveItem |
{ key } |
{ success } |
SecureStorage.Clear |
— | { success } |
Platform notes
- Android — Values are AES-256-GCM encrypted with a key stored in the Android Keystore. Values persist across app launches but are cleared if the app is uninstalled.
- iOS — Values are stored in the Keychain with
kSecAttrAccessibleAfterFirstUnlock. They survive app reinstalls unless you explicitly clear them (Keychain is not tied to the app sandbox in the same way as Android). clear()only removes keys set by this plugin; it will not touch other Keychain / SharedPreferences entries.
Security caveats
Secure storage protects at rest on a non-rooted / non-jailbroken device. It is not a substitute for:
- Short-lived / rotating tokens on the server side.
- TLS for data in transit.
- App-level auth gating (see
projectmata/mobile-biometrics) for high-value actions.
License
MIT