1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-07 11:03:54 +00:00

PM-115 Temporarily Changed cipher key new encryption config to help testing (this change should be reseted eventually)

This commit is contained in:
Federico Maccaroni
2023-05-31 11:01:44 +03:00
parent bcd47b3b3e
commit e19b86ee00
2 changed files with 5 additions and 3 deletions

View File

@@ -64,7 +64,7 @@
public const int Argon2Parallelism = 4;
public const int MasterPasswordMinimumChars = 12;
public const int CipherKeyRandomBytesLength = 64;
public const string CipherKeyEncryptionMinServerVersion = "2023.5.0";
public const string CipherKeyEncryptionMinServerVersion = "2023.3.0";
public static readonly string[] AndroidAllClearCipherCacheKeys =
{

View File

@@ -1,4 +1,6 @@
using System;
#define ENABLE_NEW_CIPHER_KEY_ENCRYPTION_ON_CREATION
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -222,7 +224,7 @@ namespace Bit.Core.Services
cipher.Key = await _cryptoService.EncryptAsync(cipherView.Key.Key, key);
return cipherView.Key;
}
#if DEBUG
#if ENABLE_NEW_CIPHER_KEY_ENCRYPTION_ON_CREATION
// turned on, only on debug to check that the enc/decryption is working fine at the cipher level.
// this will be allowed on production on a later release.
var cfs = ServiceContainer.Resolve<ICryptoFunctionService>();