Closed maschall closed 2 months ago
Thanks for this, this is a change we're generally happy to make. Can I make a few requests?
Firstly, let's prefer to offer an API that exposes an Array
. That will generally be more useful than the tuple we have here.
Secondly, can you add a unit test that drives that API? It'll help us avoid regressing it.
That is interesting about the [UInt8] because that is how I use it in my code, and had to repeat a lot of ivBytes.0, 1, 2,...
So I'm happy to expose and API and unit tests
Closing in favor of #261
Checklist
Motivation:
Right now, we're using CommonCrypto and would like to switch to Crypto instead. However, the requirement we need is that we send the data for IV to the server for them to verify the signature we are sending them. Similarly, they send us their IV and we verify the signature of other data. (Which is supported currently)
Modifications:
By making
ivBytes
public, we can access the randomly generated salt for our cipher.Result:
I can replace CommonCrypto code in my repo with Crypto instead :)