-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose StoredKey encryption parameters (#1766)
* Expose StoredKey encryption parameters * Add Swift test * Test adjustments, review comments * Add test with default encryption parameters * Break up EncryptionParameters to EncryptedPayload and EncryptionParameters * Weak and Standard levels, provide level in constructor, tests with 2 levels * Enum to TW include * Expose encryption level in TWStoredKeyCreate * Remove StoreKey ctor parameter default value * Update TW enum, to fix swift/kotlin compilation * Proper breakup of json parse/create
- Loading branch information
Showing
12 changed files
with
311 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright © 2017-2021 Trust Wallet. | ||
// | ||
// This file is part of Trust. The full Trust copyright notice, including | ||
// terms governing use, modification, and redistribution, is contained in the | ||
// file LICENSE at the root of the source code distribution tree. | ||
|
||
#pragma once | ||
|
||
#include "TWBase.h" | ||
|
||
TW_EXTERN_C_BEGIN | ||
|
||
/// Preset encryption parameter with different security strength, for key store | ||
TW_EXPORT_ENUM(uint32_t) | ||
enum TWStoredKeyEncryptionLevel { | ||
/// Default, which is one of the below values, determined by the implementation. | ||
TWStoredKeyEncryptionLevelDefault = 0, | ||
/// Minimal sufficient level of encryption strength (scrypt 4096) | ||
TWStoredKeyEncryptionLevelWeak = 1, | ||
/// Standard level of encryption strength (scrypt 262k) | ||
TWStoredKeyEncryptionLevelStandard = 2, | ||
}; | ||
|
||
TW_EXTERN_C_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.