Skip to content

Jhonny/ev 806 create a java sdk - #2

Closed
Jhonny Knaak de Vargas (jkvargas) wants to merge 106 commits into
masterfrom
jhonny/ev-806-create-a-java-sdk
Closed

Jhonny Knaak de Vargas (jkvargas) wants to merge 106 commits into
masterfrom
jhonny/ev-806-create-a-java-sdk

Conversation

@jkvargas

@jkvargas Jhonny Knaak de Vargas (jkvargas) commented Jan 19, 2022 •

Copy link
Copy Markdown

Stuck point

consider python's sdk.
looking at __fetch_cage_key and __generate_shared_key
im trying to perform something simillar with the test generateSharedKeyWithDecodedStringDoesNotThrow.
which is not working and I am not sure what should I do to fix it.
Maybe you guys can throw some light on me :)

About the code

EverVault class is the entry point for the SDK.
basically its where I am assembling which implementation is going to perform the requirements of the contracts.
I've done this in this way in order to achive decoupling and follow the SOLID principle of "Open to extension, closed to modification". I can explain in more detail.

CircuitBreaker is a cloud pattern to deny the SDK to keep calling the API when its slow to respond.
https://docs.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker

Points to discuss

I am not sure if we need or if we should have handlers for data types like Vector, Map and Serializable.
Maybe we should leave this for the user to take a look at.
The signature for encrypting data ended up being Object encrypt(Object data)
maybe if we don't handle complex structures we could change it to something else.

Whats next

  • Need to find out how to package the api in order for 3rd parties to use it.
  • Need to try to use the api on a "real environment"
  • Need to find out how to perform integration tests on it.

jvargas added 30 commits January 5, 2022 12:44
# Conflicts:
#	.gitignore
#	.idea/workspace.xml
Understanding wiremock functionality
Test should be failing.
TODO: Identify how java and gradle handle versioning.
TODO: Identify how to deal with async in Java
Adding overloaded method.
Splitting interfaces in order to follow the SOLID's interface segregation principle.
Working on map based data types.
Jhonny Knaak de Vargas added 27 commits January 20, 2022 14:47
./gradlew test
and
./gradlew integrationTests
256R1 is available with EncryptionServiceBasedOnCurve256R1.java
256R1 is available with EncryptionServiceBasedOnCurve256R1.java
256R1 is available with EncryptionServiceBasedOnCurve256R1.java
Matt (matt-evervault) pushed a commit that referenced this pull request Nov 17, 2026
# This is the 1st commit message:

chore(deps): bump the gradle-minor-and-patch group with 3 updates

Bumps the gradle-minor-and-patch group with 3 updates: [com.google.code.gson:gson](https://github.com/google/gson), [com.google.guava:guava](https://github.com/google/guava) and [gradle-wrapper](https://github.com/gradle/gradle).


Updates `com.google.code.gson:gson` from 2.14.0 to 2.15.0
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.14.0...gson-parent-2.15.0)

Updates `com.google.guava:guava` from 33.7.1-android to 33.7.2-android
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

Updates `gradle-wrapper` from 9.8.0 to 9.8.2
- [Release notes](https://github.com/gradle/gradle/releases)
- [Commits](gradle/gradle@v9.8.0...v9.8.2)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gradle-minor-and-patch
- dependency-name: com.google.guava:guava
  dependency-version: 33.7.2-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-minor-and-patch
- dependency-name: gradle-wrapper
  dependency-version: 9.8.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: gradle-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
# This is the commit message #2:

fix(test): stop relying on gson internal LinkedTreeMap type

Gson 2.15.0 changed the default Map implementation used when
deserializing an untyped JSON object from LinkedTreeMap to
LinkedHashMap. The WireMock test for runCage() cast the deserialized
result directly to the internal com.google.gson.internal.LinkedTreeMap
class, which broke with a ClassCastException after the dependency
bump. Cast to the public java.util.Map interface instead, matching
how callers of CageRunResult.result should consume it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant