Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Client Library
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Vereign Client Library
Commits
503ae787
Commit
503ae787
authored
4 years ago
by
Daniel Lyubomirov
Browse files
Options
Downloads
Patches
Plain Diff
[17] win fixes
parent
7be42844
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!97
Crypto Storage and LoginWithNewDevice and LoginWithPreviouslyAddedDevice APIs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpp/src/vereign/kvstore/detail/win_crypto_storage.cc
+1
-2
1 addition, 2 deletions
cpp/src/vereign/kvstore/detail/win_crypto_storage.cc
cpp/tests/vereign/ncrypt/rsa_test.cc
+2
-4
2 additions, 4 deletions
cpp/tests/vereign/ncrypt/rsa_test.cc
with
3 additions
and
6 deletions
cpp/src/vereign/kvstore/detail/win_crypto_storage.cc
+
1
−
2
View file @
503ae787
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
cpp/tests/vereign/ncrypt/rsa_test.cc
+
2
−
4
View file @
503ae787
...
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment