mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 09:58:27 +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 storageService = Substitute.For<ISecureStorageService>();
|
||||||
var keyService = Substitute.For<IKeyDerivationService>();
|
var keyService = Substitute.For<IKeyDerivationService>();
|
||||||
|
storageService.Contains("key").Returns(true);
|
||||||
storageService.Retrieve("key").Returns(
|
storageService.Retrieve("key").Returns(
|
||||||
Convert.FromBase64String("QpSYI5k0bLQXEygUEHn4wMII3ERatuWDFBszk7JAhbQ="));
|
Convert.FromBase64String("QpSYI5k0bLQXEygUEHn4wMII3ERatuWDFBszk7JAhbQ="));
|
||||||
|
|
||||||
var service = new CryptoService(storageService, keyService);
|
var service = new CryptoService(storageService, keyService);
|
||||||
var encryptedHi = service.Encrypt(value);
|
var encryptedValue = service.Encrypt(value);
|
||||||
return service.Decrypt(encryptedHi);
|
return service.Decrypt(encryptedValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue