On 20.07.24 14:52 , Gary Gregory wrote:
Could this be achieved via a mock, if only to validate that a regression won't happen?
Assuming we'd want to test that on an XDH instantiated with raw=true calculateK() returns the full 32 bytes of the secret resulting from a curve25519 key agreement even if that secret starts with a zero byte: I don't see how. Would require instantiating XDH with a mocked MontgomeryCurve. MontgomeryCurve is an enum and cannot be mocked. Even if I'd introduce an interface, I'd then have to stub createKeyAgreement() to return a mocked KeyAgreement, on which I'd then want to stub several methods. But those methods are final. Cheers, Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org