1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 18:43:43 +00:00

new enc key implementation

This commit is contained in:
Kyle Spearrin
2017-05-31 22:47:19 -04:00
parent aa1ed52f64
commit 2fa7b532b1
10 changed files with 84 additions and 84 deletions

View File

@@ -6,5 +6,6 @@
public string Email { get; set; }
public string MasterPasswordHash { get; set; }
public string MasterPasswordHint { get; set; }
public string Key { get; set; }
}
}

View File

@@ -10,6 +10,8 @@ namespace Bit.App.Models.Api
public string MasterPasswordHint { get; set; }
public string Culture { get; set; }
public bool TwoFactorEnabled { get; set; }
public string Key { get; set; }
public string PrivateKey { get; set; }
public IEnumerable<ProfileOrganizationResponseModel> Organizations { get; set; }
}
}

View File

@@ -15,5 +15,6 @@ namespace Bit.App.Models.Api
public string TokenType { get; set; }
public List<int> TwoFactorProviders { get; set; }
public string PrivateKey { get; set; }
public string Key { get; set; }
}
}

View File

@@ -83,18 +83,13 @@ namespace Bit.App.Models
}
EncryptionType = encryptionType;
EncryptedString = string.Format("{0}|{1}", initializationVector, cipherText);
EncryptedString = string.Format("{0}.{1}|{2}", (byte)EncryptionType, initializationVector, cipherText);
if(!string.IsNullOrWhiteSpace(mac))
{
EncryptedString = string.Format("{0}|{1}", EncryptedString, mac);
}
if(EncryptionType != EncryptionType.AesCbc256_B64)
{
EncryptedString = string.Format("{0}.{1}", (byte)EncryptionType, EncryptedString);
}
CipherText = cipherText;
InitializationVector = initializationVector;
Mac = mac;