Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
Packer represents an Authcrypt Pack/Unpacker that outputs/reads Aries envelopes.
func New ¶
New will create a Packer instance to 'AuthCrypt' payloads for a given sender and list of recipients keys using DIDComm typ V2 value (default envelope 'typ' protected header). It opens thirdPartyKS store (or fetch cached one) that contains third party keys. This store must be pre-populated with the sender key required by a recipient to Unpack a JWE envelope. It is not needed by the sender (as the sender packs the envelope with its own key). The returned Packer contains all the information required to pack and unpack payloads.
func (*Packer) Pack ¶
func (p *Packer) Pack(contentType string, payload, senderID []byte, recipientsPubKeys [][]byte) ([]byte, error)
Pack will encode the payload argument with contentType argument Using the protocol defined by the Authcrypt message of Aries RFC 0334 with the following arguments: payload: the payload message that will be protected senderID: the key id of the sender (stored in the KMS) recipientsPubKeys: public keys.