Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Conversation

@thoag-godaddy
Copy link
Contributor

Previously attempts to encrypt larger pieces of data received a -3 error "EncryptToJson: JsonToBuffer: Output buffer needed XXX bytes". This change uses the same method as the typescript version to better estimate response size

@thoag-godaddy
Copy link
Contributor Author

Benchmark before

Benchmarking encrypt/decrypt round trips of "b'mysecretdata'".
Executed 100 iterations in 0.01407377100076701 seconds.
Executed 1000 iterations in 0.13790925899957074 seconds.
Executed 10000 iterations in 1.3697859630001403 seconds.
Executed 100000 iterations in 13.484866296999826 seconds.

And After

Executed 100 iterations in 0.015025922999484465 seconds.
Executed 1000 iterations in 0.13937084400004096 seconds.
Executed 10000 iterations in 1.3681038099994112 seconds.
Executed 100000 iterations in 13.687599488999695 seconds.

Not a significant difference

@jgowdy jgowdy merged commit 5265878 into godaddy:main Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants