tuweni / org.apache.tuweni.crypto / SECP256K1 / calculateKeyAgreement

calculateKeyAgreement

static fun calculateKeyAgreement(privKey: SecretKey!, theirPubKey: PublicKey!): Bytes32! (source)

Calculates an ECDH key agreement between the private and the public key of another party, formatted as a 32 bytes array.

Parameters

privKey - SecretKey!: the private key

theirPubKey - PublicKey!: the public key

Return
Bytes32!: shared secret as 32 bytes