-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symmetric keygen: high-level wrappers #561
Merged
ilammy
merged 13 commits into
cossacklabs:master
from
ilammy:themis_gen_sym_key/wrappers
Dec 11, 2019
Merged
Symmetric keygen: high-level wrappers #561
ilammy
merged 13 commits into
cossacklabs:master
from
ilammy:themis_gen_sym_key/wrappers
Dec 11, 2019
Commits on Dec 6, 2019
-
C++ provides both convenient and in-place key generation routines. In-place key generation may be useful for C++03 code that does not want to have an extra copy of std::vector when it's being returned. ThemisPP does not provide separate types for keys, it works with plain std::vector.
Configuration menu - View commit details
-
Copy full SHA for 9637896 - Browse repository at this point
Copy the full SHA 9637896View commit details -
Straightforward implementation. The only interestring thing is that size_t is mapped to i32 with Emscripten, as noted in all other APIs.
Configuration menu - View commit details
-
Copy full SHA for 2a7d3a8 - Browse repository at this point
Copy the full SHA 2a7d3a8View commit details -
Straightforward implementation. GoThemis provides wrapper types for private and public keys so we add another one with the same interface for symmetric keys. Currently GoThemis does not return Themis error codes to Go, so CGo code returns "bool" for simplicity and consistency.
Configuration menu - View commit details
-
Copy full SHA for d7bbef3 - Browse repository at this point
Copy the full SHA d7bbef3View commit details -
Symmetric keygen: ObjCThemis and SwiftThemis
Straightforward implementation. Objective-C function is automatically bridged to Swift, we don't have to do anything for that. Keypair generation API for ObjCThemis does not report exact errors to the user and simply returns "nil", We do the same for symmetric key generation for consistency.
Configuration menu - View commit details
-
Copy full SHA for b4ce8bd - Browse repository at this point
Copy the full SHA b4ce8bdView commit details -
Straightforward implementation. PHPThemis exports its functionality as PHP functions so just add a new one. Byte arrays are returned as simply strings, no new types here. Just don't forget that we have to support both PHP 5 and PHP 7 wrappers.
Configuration menu - View commit details
-
Copy full SHA for f72c0e1 - Browse repository at this point
Copy the full SHA f72c0e1View commit details -
Straightforward implementation. string_at() returns "str" with Python 2 and "bytes" with Python 3.
Configuration menu - View commit details
-
Copy full SHA for c0cc339 - Browse repository at this point
Copy the full SHA c0cc339View commit details -
Straightforward implementation. Probably the most concise one :)
Configuration menu - View commit details
-
Copy full SHA for 971c2b2 - Browse repository at this point
Copy the full SHA 971c2b2View commit details -
Straigtforward implementation (albeit verbose). RustThemis has a relatively high bar for API documentation quality. Don't let it drop and provide detailed descriptions. themis_gen_sym_key() is added to libthemis-sys by bindgen automatically, we don't have to remember to do that manually.
Configuration menu - View commit details
-
Copy full SHA for c5c3e80 - Browse repository at this point
Copy the full SHA c5c3e80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87ea19a - Browse repository at this point
Copy the full SHA 87ea19aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a00dbf0 - Browse repository at this point
Copy the full SHA a00dbf0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62ade93 - Browse repository at this point
Copy the full SHA 62ade93View commit details -
fixup! Symmetric keygen: ObjCThemis and SwiftThemis
Resolve a warning about "this function declaration is not a prototype". Objective-C is still C, not C++, so if a function does not take any arguments then it should have "(void)" argument list, not "()". Latter is considered to take any number of any arguments (for legacy reasons).
Configuration menu - View commit details
-
Copy full SHA for 748664d - Browse repository at this point
Copy the full SHA 748664dView commit details -
Just like with JsThemis that has nontrivial wrapper, let's make sure that key generation returns distinct objects for every call and we don't do anything silly in the implementation.
Configuration menu - View commit details
-
Copy full SHA for 5922a4f - Browse repository at this point
Copy the full SHA 5922a4fView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.