### Method

# Camel CipherContext sign

since: 3.0

#### Declaration [src]

    void
    camel_cipher_context_sign (
      CamelCipherContext* context,
      const gchar* userid,
      CamelCipherHash hash,
      CamelMimePart* ipart,
      CamelMimePart* opart,
      gint io_priority,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Asynchronously converts the (unsigned) part `ipart` into a new self-contained MIME part `opart`. This may be a multipart/signed part, or a simple part for enveloped types.

When the operation is finished, `callback` will be called. You can then call `camel_cipher_context_sign_finish()` to get the result of the operation.

Available since: 3.0

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

#### Parameters

`userid`

  Type: `const gchar*`

  A private key to use to sign the stream.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`hash`

  Type: `CamelCipherHash`

  Preferred Message-Integrity-Check hash algorithm.

`ipart`

  Type: `CamelMimePart`

  Input `CamelMimePart`.

  The data is owned by the caller of the method.

`opart`

  Type: `CamelMimePart`

  Output `CamelMimePart`.

  The data is owned by the caller of the method.

`io_priority`

  Type: `gint`

  The I/O priority of the request.

`cancellable`

  Type: `GCancellable`

  Optional `GCancellable` object, or `NULL`.

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

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback` to call when the request is satisfied.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to pass to the callback function.

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