Commit Graph
3 Commits
Author SHA1 Message Date
Renee Vandervelde c2b91c2c69 Use single shared method for return code checking.
This defers the return code logic to a named method `isLibsodiumSuccessCode`
to reduce the liklihood of error when checking codes.
This will also now throw an `IllegalStateException` in the event that an
unknown code is returned.
2024-07-02 11:00:22 -05:00
Renee Vandervelde bd3cbb1662 Cleanup deprecated methods.
Noticed a handful of deprecated methods and minor warnings while looking around.
Replaces with recommended methods
2024-07-02 09:50:45 -05:00
Renee Vandervelde 77445bb5cf Fix Equality Check in XChaCha20EncryptionResult
The `XChaCha20EncryptionResult` data class currently implements
its own equality check due to the class's byte array members.
However, this is using a standard equality check, `==`, rather
than checking the array's contents. This will cause two results
with the same contained values to return `false` on an equals check.

Confirmed this issue with a unit test, and fixed by changing the
implemented method to use `contentEquals` instead.
2024-06-14 21:11:29 -05:00