SecretExchange
Object Hierarchy:
Description:
Allows exchange of secrets between two processes on the same system without exposing those secrets to things like loggers, non-pageable memory etc.
This does not protect against active attacks like MITM attacks.
Each side creates a secret exchange object, and one of the sides calls [method@SecretExchange.begin]. This creates a string, which should be passed to the other side. Each side passes the strings it receives into [method@SecretExchange.receive].
In order to send a reply (either with or without a secret) use [method@SecretExchange.send]. A side must have successfully called [ method@SecretExchange.receive] before it can use [method@SecretExchange.send].
The secret exchange objects can be used for multiple iterations of the conversation, or for just one request/reply. The only limitation being that the initial request cannot contain a secret.
Caveat: Information about the approximate length (rounded up to the nearest 16 bytes) may be leaked. If this is considered inacceptable, do not use [class@SecretExchange].