Skip to content
Snippets Groups Projects
Commit 503ae787 authored by Daniel Lyubomirov's avatar Daniel Lyubomirov
Browse files

[17] win fixes

parent 7be42844
No related branches found
No related tags found
1 merge request!97Crypto Storage and LoginWithNewDevice and LoginWithPreviouslyAddedDevice APIs
......@@ -95,8 +95,7 @@ void CryptoStorageImpl::Reset(const std::string& pin) {
storage_.DeleteAll();
bytes::Buffer key{aesKeySizeBytes};
crypto::Rand(key);
auto key = crypto::Rand(aesKeySizeBytes);
bytes::Buffer encrypted_key;
ncrypt::rsa::PublicKeyEncrypt(rsa_key.Get(), key.View(), encrypted_key);
......
......@@ -184,8 +184,7 @@ TEST_CASE("ncrypt::rsa PublicKeyEncrypt/PrivateKeyDecrypt", "[vereign/ncrypt/rsa
}
SECTION("max size input") {
bytes::Buffer input{214};
crypto::Rand(input);
auto input = crypto::Rand(214);
bytes::Buffer encrypted;
ncrypt::rsa::PublicKeyEncrypt(key.Get(), input.View(), encrypted);
......@@ -197,8 +196,7 @@ TEST_CASE("ncrypt::rsa PublicKeyEncrypt/PrivateKeyDecrypt", "[vereign/ncrypt/rsa
}
SECTION("invalid big input") {
bytes::Buffer input{215};
crypto::Rand(input);
auto input = crypto::Rand(215);
bytes::Buffer encrypted;
CHECK_THROWS_WITH(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment