-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: moved DBEncryption to a separate class
- Loading branch information
Desu Sai Venkat
committed
Aug 29, 2023
1 parent
8dfabc7
commit e2bc7ee
Showing
3 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/plugins/rudder_plugin_interface/lib/src/models/db_encryption.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class DBEncryption { | ||
// @param whether the SDK should encrypt the DB | ||
final bool _enabled; | ||
|
||
// @param key to be used for encryption | ||
final String _key; | ||
|
||
DBEncryption(enabled, key) | ||
: _enabled = enabled, | ||
_key = key; | ||
|
||
bool get enabled => _enabled; | ||
String get key => _key; | ||
|
||
Map getMap() { | ||
return {"enabled": _enabled, "key": _key}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters