Skip to content

Commit

Permalink
Adding Android Keystore Provider and Keyhandle by Team Netwatch (B) (#5)
Browse files Browse the repository at this point in the history
* feat: added internal work to fork

* fix: added missing changes

* feat: implemented config

* fix: added lib cratetype

* fix: AndroidConfig has to be public

* fix: missing match in instance

* fix: don't load java vm in initialize_module, as it will be called before the config was passed

* feat: added default logging implementation for android

* feat: implemented symmetric algorithm for encryption, *not tested

* fix: change traits to use Box<dyn Any>

When using Box<dyn ProviderConfig>, you would have to upcast the dyn ProviderConfig to dyn Any. This feature is currently experimental (rust-lang/rust#65991). As ProviderConfig is always going to be turned into an Any, it has no real purpose anyways.
BREAKING

* test(mod.rs): adding the tests again

* feat: Add set_key_size and set_algorithm_parameter_spec methods to Builder

* fix: Update set_algorithm_parameter_spec method in Builder

* feat: docs for set_block_modes, set_key_size and set_algorithm_parameter_spec

* fix: builder methods using wrong parameters

* feat: wrapped KeyGenerator for symmetric encryption

* feat: added symetrical encryption for android

* fix: added more paddings

* fix: readded common tests

* fix: readded other tests

* fix: mod.rs

* fix: wrang hash names for signature

---------

Co-authored-by: markoisus <marko.nikolic34567@gmail.com>
Co-authored-by: Dexter <84778260+DexterHK@users.noreply.github.com>
Co-authored-by: Baibars <dexterhk01@gmail.com>
  • Loading branch information
4 people authored Jun 4, 2024
1 parent f31a4ae commit e215f72
Show file tree
Hide file tree
Showing 26 changed files with 2,769 additions and 16 deletions.
225 changes: 225 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name = "crypto-layer"
version = "0.1.0"
edition = "2021"
license = "MIT"
crate-type = ["staticlib"]

[lib]
crate-type = ["cdylib"]
crate-type = ["cdylib", "lib"]

[profile.dev]
debug-assertions = true
Expand All @@ -24,7 +23,7 @@ debug = false
strip = "symbols"

[features]
android = []
android = ["robusta_jni", "libloading", "tracing-android"]
debug = []
hsm = []
ffi = []
Expand All @@ -50,6 +49,9 @@ tracing = { version = "0.1.40", features = ["std", "log"] }
tracing-subscriber = "0.3.18"
tracing-appender = "0.2.3"
yubikey = { version = "0.8.0", optional = true }
robusta_jni = { version = "0.2", optional = true }
libloading = { version = "0.8.3", optional = true}
tracing-android = { version = "0.2.0", optional = true }

[dev-dependencies]
test-case = "*"
Loading

0 comments on commit e215f72

Please sign in to comment.