### Method

# Gck Session generate_key_pair_async

#### Declaration [src]

    void
    gck_session_generate_key_pair_async (
      GckSession* self,
      GckMechanism* mechanism,
      GckAttributes* public_attrs,
      GckAttributes* private_attrs,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Generate a new key pair of public and private keys. This call will return immediately and complete asynchronously.

If `public_attrs` and/or `private_attrs` is a floating reference, it is consumed.

This method completes asynchronously. Use `gck_session_generate_key_pair_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`mechanism`

  Type: `GckMechanism`

  The mechanism to use for key generation.

  The data is owned by the caller of the method.

`public_attrs`

  Type: `GckAttributes`

  Additional attributes for the generated public key.

  The data is owned by the caller of the method.

`private_attrs`

  Type: `GckAttributes`

  Additional attributes for the generated private key.

  The data is owned by the caller of the method.

`cancellable`

  Type: `GCancellable`

  Optional cancellation object or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  Called when the operation completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to pass to the callback.

  The argument can be `NULL`.
  The data is owned by the caller of the method.