Function encryptPayload
Encrypt the payload with the shared secret generated from the ephemeral key-pair and the target node's public key.
EncryptedPayload encryptPayload
(
Payload payload,
agora .crypto .ECC .Pair ephemeral_kp,
agora .crypto .ECC .Point target_pk,
out agora .crypto .ECC .Point shared_secret
) @trusted;
EncryptedPayload encryptPayload
(
Payload payload,
agora .crypto .ECC .Pair ephemeral_kp,
agora .crypto .ECC .Point target_pk
);
Parameters
Name | Description |
---|---|
payload | the raw payload |
ephemeral_kp | the ephemeral key-pair that's generated uniquely for each new payload |
target_pk | the target node's public key |
shared_secret | secret used to encrypt the payload |
Returns
the serialized and encrypted payload