### Constructor

# Gcr SecretExchange new

#### Declaration [src]

    GcrSecretExchange*
    gcr_secret_exchange_new (
      const gchar* protocol
    )

#### Description [src]

Create a new secret exchange object.

Specify a protocol of `NULL` to allow any protocol. This is especially relevant on the side of the exchange that does not call `gcr_secret_exchange_begin()`, that is the originator. Currently the only protocol supported is `GCR_SECRET_EXCHANGE_PROTOCOL_1`.

#### Parameters

`protocol`

  Type: `const gchar*`

  The exchange protocol to use.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `GcrSecretExchange`

A new `GcrSecretExchange` object.

The caller of the function takes ownership of the data, and is responsible for freeing it.