mirror of
https://github.com/bitwarden/mobile
synced 2025-12-17 16:53:26 +00:00
[PM-2713] add make user key method to crypto service
This commit is contained in:
@@ -51,6 +51,11 @@ namespace Bit.Core.Services
|
||||
return await GetUserKeyAsync(userId) != null;
|
||||
}
|
||||
|
||||
public async Task<UserKey> MakeUserKeyAsync()
|
||||
{
|
||||
return new UserKey(await _cryptoFunctionService.RandomBytesAsync(64));
|
||||
}
|
||||
|
||||
public async Task ClearUserKeyAsync(string userId = null)
|
||||
{
|
||||
await _stateService.SetUserKeyAsync(null, userId);
|
||||
|
||||
Reference in New Issue
Block a user