1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 17:23:18 +00:00

Cherry-picked [PM-115] Cipher key encryption update (#2421)

This commit is contained in:
Federico Maccaroni
2023-09-29 17:29:04 -03:00
parent 4cc5e13b61
commit ee1cbae589
26 changed files with 244 additions and 88 deletions

View File

@@ -236,9 +236,9 @@ namespace Bit.Core.Services
{
throw new ArgumentNullException(nameof(key));
}
if (!(key is UserKey) && !(key is OrgKey))
if (!(key is UserKey) && !(key is OrgKey) && !(key is CipherKey))
{
throw new ArgumentException($"Data encryption keys must be of type UserKey or OrgKey. {key.GetType().FullName} unsupported.");
throw new ArgumentException($"Data encryption keys must be of type UserKey or OrgKey or CipherKey. {key.GetType().FullName} unsupported.");
}
var newSymKey = await _cryptoFunctionService.RandomBytesAsync(64);