GatewayManager

class GatewayManager(privateKeyStore: PrivateKeyStore, sessionPublicKeyStore: SessionPublicKeyStore, cryptoOptions: NodeCryptoOptions = NodeCryptoOptions()) : NodeManager<GatewayEncryptedPayload>

Constructors

Link copied to clipboard
constructor(privateKeyStore: PrivateKeyStore, sessionPublicKeyStore: SessionPublicKeyStore, cryptoOptions: NodeCryptoOptions = NodeCryptoOptions())

Functions

Link copied to clipboard
suspend fun generateSessionKeyPair(nodeId: String, peerId: String? = null): SessionKeyPair
Link copied to clipboard

Decrypt and return the payload in the message.

Link copied to clipboard
suspend fun <P : EncryptedPayload> wrapMessagePayload(payload: P, peerId: String, nodeId: String): ByteArray

Encrypt and serialize the payload.