mirror of
https://github.com/bitwarden/mobile
synced 2025-12-21 10:43:22 +00:00
Changed all C# control flow block statements to include space between keyword and open paren (#800)
This commit is contained in:
@@ -8,18 +8,18 @@ namespace Bit.Core.Models.Domain
|
||||
{
|
||||
public SymmetricCryptoKey(byte[] key, EncryptionType? encType = null)
|
||||
{
|
||||
if(key == null)
|
||||
if (key == null)
|
||||
{
|
||||
throw new Exception("Must provide key.");
|
||||
}
|
||||
|
||||
if(encType == null)
|
||||
if (encType == null)
|
||||
{
|
||||
if(key.Length == 32)
|
||||
if (key.Length == 32)
|
||||
{
|
||||
encType = EncryptionType.AesCbc256_B64;
|
||||
}
|
||||
else if(key.Length == 64)
|
||||
else if (key.Length == 64)
|
||||
{
|
||||
encType = EncryptionType.AesCbc256_HmacSha256_B64;
|
||||
}
|
||||
@@ -32,17 +32,17 @@ namespace Bit.Core.Models.Domain
|
||||
Key = key;
|
||||
EncType = encType.Value;
|
||||
|
||||
if(EncType == EncryptionType.AesCbc256_B64 && Key.Length == 32)
|
||||
if (EncType == EncryptionType.AesCbc256_B64 && Key.Length == 32)
|
||||
{
|
||||
EncKey = Key;
|
||||
MacKey = null;
|
||||
}
|
||||
else if(EncType == EncryptionType.AesCbc128_HmacSha256_B64 && Key.Length == 32)
|
||||
else if (EncType == EncryptionType.AesCbc128_HmacSha256_B64 && Key.Length == 32)
|
||||
{
|
||||
EncKey = new ArraySegment<byte>(Key, 0, 16).ToArray();
|
||||
MacKey = new ArraySegment<byte>(Key, 16, 16).ToArray();
|
||||
}
|
||||
else if(EncType == EncryptionType.AesCbc256_HmacSha256_B64 && Key.Length == 64)
|
||||
else if (EncType == EncryptionType.AesCbc256_HmacSha256_B64 && Key.Length == 64)
|
||||
{
|
||||
EncKey = new ArraySegment<byte>(Key, 0, 32).ToArray();
|
||||
MacKey = new ArraySegment<byte>(Key, 32, 32).ToArray();
|
||||
@@ -52,15 +52,15 @@ namespace Bit.Core.Models.Domain
|
||||
throw new Exception("Unsupported encType/key length.");
|
||||
}
|
||||
|
||||
if(Key != null)
|
||||
if (Key != null)
|
||||
{
|
||||
KeyB64 = Convert.ToBase64String(Key);
|
||||
}
|
||||
if(EncKey != null)
|
||||
if (EncKey != null)
|
||||
{
|
||||
EncKeyB64 = Convert.ToBase64String(EncKey);
|
||||
}
|
||||
if(MacKey != null)
|
||||
if (MacKey != null)
|
||||
{
|
||||
MacKeyB64 = Convert.ToBase64String(MacKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user