vault unlocking WIP

This commit is contained in:
TheXamlGuy
2024-05-03 19:33:32 +01:00
parent b17be4b0b8
commit e8b9eb7ae5
17 changed files with 102 additions and 43 deletions
+5 -3
View File
@@ -18,10 +18,12 @@ public class OpenVaultHandler(VaultConfiguration configuration,
byte[]? salt = Convert.FromBase64String(keyPart[0]);
byte[]? encryptedKey = Convert.FromBase64String(keyPart[1]);
VaultKey key = keyVaultFactory.Create(Encoding.UTF8.GetBytes(password), encryptedKey, salt);
if (await vaultStorage.CreateAsync(name, key))
if ( keyVaultFactory.Create(Encoding.UTF8.GetBytes(password), encryptedKey, salt) is VaultKey key)
{
if (await vaultStorage.Create(name, key))
{
return true;
}
}
}
}