KeyAgreement.calculateSecret
ubyte[] calculateSecret(PublicKey publicKey)Calculates the shared secret using the peer's public key.
The caller owns the returned secret bytes: they live in GC memory that nothing zeroes automatically. Zeroize them with common.secureZero as soon as they have been consumed (e.g., fed to a KDF).
Parameters
publicKey | The peer's public key. |
Returns
The generated shared secret.