aries / net.globalid.aries.message.envelope / EnvelopeService

EnvelopeService

class EnvelopeService

Communication between different agents is encrypted Envelope Service is responsible to correctly encrypt and decrypt messages

Constructors

<init>

Communication between different agents is encrypted Envelope Service is responsible to correctly encrypt and decrypt messages

EnvelopeService()

Functions

packMessage

Encrypts an agent message from OutboundMessage

fun packMessage(wallet: Wallet, outboundMessage: OutboundMessage): Single<OutboundPackage>

unpackMessage

Unpacks the given packed message. The JSON parsing needs to happen in two steps. The first step is getting UnpackedPlainMessage, where the inner agent message is still represented as a string. In the second step, we parse this string as an AgentMessage. We can then return the UnpackedMessage.

fun unpackMessage(wallet: Wallet, packedMessage: String): Single<UnpackedMessage>