## cryptui

cryptui

## Functions

gchar * | cryptui_key_get_base ()
CryptUIEncType | cryptui_key_get_enctype ()
void | cryptui_display_notification ()
gchar ** | cryptui_prompt_recipients ()
gchar * | cryptui_prompt_signer ()
void | cryptui_need_to_get_keys ()

## Types and Values

enum | CryptUIEncType
enum | CryptUIKeyFlags
enum | CryptUILocation
enum | CryptUIValidity

## Object Hierarchy

## Description

## Functions

### cryptui_key_get_base ()

    gchar *
    cryptui_key_get_base (const gchar *key);

This function is a utility function to get the part of the key that preceeds the colon.

#### Parameters

key | key for use with libcryptui. | [in]

#### Returns

the key base if one is found in `key` or `key` if it is already a base or is invalid

### cryptui_key_get_enctype ()

    CryptUIEncType
    cryptui_key_get_enctype (const gchar *key);

A utility function to get the type of key passed in. (public, private, symmetric, etc.).

#### Parameters

key | key for use with libcryptui. | [in]

#### Returns

The type of key.

### cryptui_display_notification ()

    void
    cryptui_display_notification (const gchar *title,
                                  const gchar *body,
                                  const gchar *icon,
                                  gboolean urgent);

This function creates a notification bubble that can be updated as additional key details are discovered. See http://live.gnome.org/Seahorse/DBus for a description of the markup syntax.

#### Parameters

title | Headline for the notification. | [in][allow-none]
body | Text for the body of the notification. | [in][allow-none]
icon | Full path to icon to be included. | [in][allow-none]
urgent | Whether the notification is urgent or not. | [in][allow-none]

### cryptui_prompt_recipients ()

    gchar **
    cryptui_prompt_recipients (CryptUIKeyset *keyset,
                               const gchar *title,
                               gchar **signer);

This function prompts the user to select one or more keys from the keyset to use to encrypt to. It also allows the user to select a private key from the keyset to sign with.

#### Parameters

keyset | CryptUIKeyset to select keys to present to the user from |
title | Window title for presented GtkWindow |
signer | Variable in which to store the key of the signer if one is selected |

#### Returns

the selected key

### cryptui_prompt_signer ()

    gchar *
    cryptui_prompt_signer (CryptUIKeyset *keyset,
                           const gchar *title);

This function prompts the user to select a private key from the keyset to use to sign something.

#### Parameters

keyset | CryptUIKeyset to select keys to present to the user from |
title | Window title for presented GtkWindow |

#### Returns

the selected key

### cryptui_need_to_get_keys ()

    void
    cryptui_need_to_get_keys ();

This function is called when seahorse needs to be launched to generate a key or keys or import a key or keys to perform the requested operation.

## Types and Values

### enum CryptUIEncType

Used in key properties to indicate what kind of key it is

Never ever change a values already present. These values are used across applications, DBus etc...

#### Members

CRYPTUI_ENCTYPE_NONE | the key is none of the below types |
CRYPTUI_ENCTYPE_SYMMETRIC | the key's type is symmetric |
CRYPTUI_ENCTYPE_PUBLIC | the key's type is public |
CRYPTUI_ENCTYPE_PRIVATE | the key's type is private |
CRYPTUI_ENCTYPE_MAXVALUE | for internal use only |

### enum CryptUIKeyFlags

Used in key properties to indicate a key's status. These values are logically OR'd together.

Never ever change a values already present. These values are used across applications, DBus etc...

#### Members

CRYPTUI_FLAG_IS_VALID | whether the key is valid |
CRYPTUI_FLAG_CAN_ENCRYPT | whether the key can encrypt |
CRYPTUI_FLAG_CAN_SIGN | whether the key can sign |
CRYPTUI_FLAG_EXPIRED | whether the key is expired |
CRYPTUI_FLAG_REVOKED | whether the key is revoked |
CRYPTUI_FLAG_DISABLED | whether the key is disabled |
CRYPTUI_FLAG_TRUSTED | whether the key is trusted |
CRYPTUI_FLAG_EXPORTABLE | whether the key is exportable |

### enum CryptUILocation

Indicates where a key is located.

Never ever change a values already present. These values are used across applications, DBus etc...

#### Members

CRYPTUI_LOC_INVALID | An invalid key |
CRYPTUI_LOC_MISSING | A key we don't know anything about |
CRYPTUI_LOC_SEARCHING | A key we're searching for but haven't found yet |
CRYPTUI_LOC_REMOTE | A key that we've found is present remotely |
CRYPTUI_LOC_LOCAL | A key on the local machine |

### enum CryptUIValidity

What the validity of the key is.

Never ever change a values already present. These values are used across applications, DBus etc...

#### Members

CRYPTUI_VALIDITY_REVOKED | the key is revoked |
CRYPTUI_VALIDITY_DISABLED | the key is disabled |
CRYPTUI_VALIDITY_NEVER | the key has never been valid |
CRYPTUI_VALIDITY_UNKNOWN | the key's validity is unknown |
CRYPTUI_VALIDITY_MARGINAL | the key's validity is marginal |
CRYPTUI_VALIDITY_FULL | the key's validity is full |
CRYPTUI_VALIDITY_ULTIMATE | the key's validity is ultimate |