TF-886 Store encryptionKey in Hive database

This commit is contained in:
dab246
2022-09-07 10:35:12 +07:00
committed by Dat H. Pham
parent f1e512148d
commit 6018cd383a
11 changed files with 209 additions and 21 deletions
@@ -0,0 +1,19 @@
import 'package:equatable/equatable.dart';
import 'package:hive/hive.dart';
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
part 'encryption_key_cache.g.dart';
@HiveType(typeId: CachingConstants.ENCRYPTION_KEY_HIVE_CACHE_IDENTIFY)
class EncryptionKeyCache extends HiveObject with EquatableMixin {
static const String keyCacheValue = 'hiveEncryptionKey';
@HiveField(0)
final String value;
EncryptionKeyCache(this.value);
@override
List<Object?> get props => [value];
}