DH_generate_parameters_ex function

  1. @RecordUse.new()
  2. @Native<Int Function(Pointer<DH>, Int, Int, Pointer<BN_GENCB>)>(ffi.Pointer<DH>, ffi.Int, ffi.Int, ffi.Pointer<BN_GENCB>)>(symbol: 'bssl_dart_DH_generate_parameters_ex')
int DH_generate_parameters_ex(
  1. Pointer<DH> dh,
  2. int prime_bits,
  3. int generator,
  4. Pointer<BN_GENCB> cb,
)

DH_generate_parameters_ex generates a suitable Diffie-Hellman group with a prime that is |prime_bits| long and stores it in |dh|. The generator of the group will be |generator|, which should be |DH_GENERATOR_2| unless there's a good reason to use a different value. The |cb| argument contains a callback function that will be called during the generation. See the documentation in |bn.h| about this. In addition to the callback invocations from |BN|, |cb| will also be called with |event| equal to three when the generation is complete.

Implementation

@meta.RecordUse()
@ffi.Native<
  ffi.Int Function(ffi.Pointer<DH>, ffi.Int, ffi.Int, ffi.Pointer<BN_GENCB>)
>(symbol: 'bssl_dart_DH_generate_parameters_ex')
external int DH_generate_parameters_ex(
  ffi.Pointer<DH> dh,
  int prime_bits,
  int generator,
  ffi.Pointer<BN_GENCB> cb,
);