mirror of
https://github.com/bitwarden/android.git
synced 2024-12-18 15:21:53 +03:00
fix crypto tests
This commit is contained in:
parent
3ad4e28a2c
commit
bdb8b5ea39
1 changed files with 3 additions and 2 deletions
|
@ -26,12 +26,13 @@ namespace Bit.App.Test
|
|||
{
|
||||
var storageService = Substitute.For<ISecureStorageService>();
|
||||
var keyService = Substitute.For<IKeyDerivationService>();
|
||||
storageService.Contains("key").Returns(true);
|
||||
storageService.Retrieve("key").Returns(
|
||||
Convert.FromBase64String("QpSYI5k0bLQXEygUEHn4wMII3ERatuWDFBszk7JAhbQ="));
|
||||
|
||||
var service = new CryptoService(storageService, keyService);
|
||||
var encryptedHi = service.Encrypt(value);
|
||||
return service.Decrypt(encryptedHi);
|
||||
var encryptedValue = service.Encrypt(value);
|
||||
return service.Decrypt(encryptedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue