decentralized-identity / DIDComm-js

JS implementation of pack and unpack
Apache License 2.0
55 stars 25 forks source link

Separate pack_auth_msg? #7

Closed dbluhm closed 4 years ago

dbluhm commented 5 years ago

I'm confused by the separate pack_auth_msg method included in the library. What is the purpose of having it separated from packMessage? It would be good to have clearer documentation on the reasoning.

kdenhartog commented 5 years ago

I can add additional documentation. For the sake of getting an answer though, the purpose is to create a distinction between a message using Authcrypt and one using Anoncrypt which guarantee different properties. The original packMessage conflated the two ideas and this separation of concern feels like a better approach for distinguishing between the two ideas.

However, the unpackMessage functionality won't change making for easy processing on the receiver side.