KeyAttributes: make more fields nullable
This commit is contained in:
parent
8ebc5e49b5
commit
11da7a4aae
|
@ -374,9 +374,9 @@ class Configuration {
|
|||
Uint8List masterKey;
|
||||
try {
|
||||
masterKey = await CryptoUtil.decrypt(
|
||||
Sodium.base642bin(attributes!.masterKeyEncryptedWithRecoveryKey),
|
||||
Sodium.base642bin(attributes!.masterKeyEncryptedWithRecoveryKey!),
|
||||
Sodium.hex2bin(recoveryKey),
|
||||
Sodium.base642bin(attributes.masterKeyDecryptionNonce),
|
||||
Sodium.base642bin(attributes.masterKeyDecryptionNonce!),
|
||||
);
|
||||
} catch (e) {
|
||||
_logger.severe(e);
|
||||
|
|
|
@ -9,8 +9,8 @@ class KeyAttributes {
|
|||
final String secretKeyDecryptionNonce;
|
||||
final int? memLimit;
|
||||
final int? opsLimit;
|
||||
final String masterKeyEncryptedWithRecoveryKey;
|
||||
final String masterKeyDecryptionNonce;
|
||||
final String? masterKeyEncryptedWithRecoveryKey;
|
||||
final String? masterKeyDecryptionNonce;
|
||||
final String? recoveryKeyEncryptedWithMasterKey;
|
||||
final String? recoveryKeyDecryptionNonce;
|
||||
|
||||
|
|
|
@ -414,8 +414,8 @@ class UserService {
|
|||
Future<void> setRecoveryKey(KeyAttributes keyAttributes) async {
|
||||
try {
|
||||
final setRecoveryKeyRequest = SetRecoveryKeyRequest(
|
||||
keyAttributes.masterKeyEncryptedWithRecoveryKey,
|
||||
keyAttributes.masterKeyDecryptionNonce,
|
||||
keyAttributes.masterKeyEncryptedWithRecoveryKey!,
|
||||
keyAttributes.masterKeyDecryptionNonce!,
|
||||
keyAttributes.recoveryKeyEncryptedWithMasterKey!,
|
||||
keyAttributes.recoveryKeyDecryptionNonce!,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue