crypto_x25519_public_key function

  1. @Native<Void Function(Pointer<Uint8>, Pointer<Uint8>)>(ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Uint8>)>()
void crypto_x25519_public_key(
  1. Pointer<Uint8> public_key,
  2. Pointer<Uint8> secret_key
)

Shared secrets are not quite random. Hash them to derive an actual shared key.

Implementation

@ffi.Native<ffi.Void Function(ffi.Pointer<ffi.Uint8>, ffi.Pointer<ffi.Uint8>)>()
external void crypto_x25519_public_key(
  ffi.Pointer<ffi.Uint8> public_key,
  ffi.Pointer<ffi.Uint8> secret_key,
);