JcatEngine: libjcat Reference Manual

## JcatEngine JcatEngine |

## Functions

JcatResult * | jcat_engine_pubkey_verify ()
JcatBlob * | jcat_engine_pubkey_sign ()
JcatResult * | jcat_engine_self_verify ()
JcatBlob * | jcat_engine_self_sign ()

## Types and Values

#define | JCAT_TYPE_ENGINE
struct | JcatEngineClass
| JcatEngine

## Description

## Functions

### jcat_engine_pubkey_verify ()

    JcatResult *
    jcat_engine_pubkey_verify (JcatEngine *self,
                               GBytes *blob,
                               GBytes *blob_signature,
                               JcatVerifyFlags flags,
                               GError **error);

Verifies a chunk of data.

#### Parameters

self | JcatEngine |
blob | GBytes |
blob_signature | GBytes |
flags | JcatVerifyFlags, e.g. `JCAT_VERIFY_FLAG_DISABLE_TIME_CHECKS` |
error | GError, or `NULL` |

#### Returns

JcatResult, or `NULL` for failed.

[transfer full]

Since: 0.1.0

### jcat_engine_pubkey_sign ()

    JcatBlob *
    jcat_engine_pubkey_sign (JcatEngine *self,
                             GBytes *blob,
                             GBytes *cert,
                             GBytes *privkey,
                             JcatSignFlags flags,
                             GError **error);

Signs a chunk of data.

#### Parameters

self | JcatEngine |
blob | GBytes |
cert | GBytes |
privkey | GBytes |
flags | JcatSignFlags, e.g. `JCAT_SIGN_FLAG_ADD_TIMESTAMP` |
error | GError, or `NULL` |

#### Returns

JcatBlob, or `NULL` for failed.

[transfer full]

Since: 0.1.0

### jcat_engine_self_verify ()

    JcatResult *
    jcat_engine_self_verify (JcatEngine *self,
                             GBytes *blob,
                             GBytes *blob_signature,
                             JcatVerifyFlags flags,
                             GError **error);

Verifies a chunk of data.

#### Parameters

self | JcatEngine |
blob | GBytes |
blob_signature | GBytes |
flags | JcatVerifyFlags, e.g. `JCAT_VERIFY_FLAG_DISABLE_TIME_CHECKS` |
error | GError, or `NULL` |

#### Returns

JcatResult, or `NULL` for failed.

[transfer full]

Since: 0.1.0

### jcat_engine_self_sign ()

    JcatBlob *
    jcat_engine_self_sign (JcatEngine *self,
                           GBytes *blob,
                           JcatSignFlags flags,
                           GError **error);

Signs a chunk of data.

#### Parameters

self | JcatEngine |
blob | GBytes |
flags | JcatSignFlags, e.g. `JCAT_SIGN_FLAG_ADD_TIMESTAMP` |
error | GError, or `NULL` |

#### Returns

JcatBlob, or `NULL` for failed.

[transfer full]

Since: 0.1.0

## Types and Values

### JCAT_TYPE_ENGINE

    #define JCAT_TYPE_ENGINE (jcat_engine_get_type ())

### struct JcatEngineClass

    struct JcatEngineClass {
    	GObjectClass		 parent_class;
    	gboolean		 (*setup)		(JcatEngine *self,
    							 GError		**error);
    	gboolean		 (*add_public_key) (JcatEngine *self,
    							 const gchar *filename,
    							 GError		**error);
    	JcatResult		*(*pubkey_verify) (JcatEngine *self,
    							 GBytes		*blob,
    							 GBytes		*blob_signature,
    							 JcatVerifyFlags flags,
    							 GError		**error);
    	JcatBlob		*(*pubkey_sign)		(JcatEngine *self,
    							 GBytes		*blob,
    							 GBytes		*cert,
    							 GBytes		*privkey,
    							 JcatSignFlags flags,
    							 GError		**error);
    	JcatResult		*(*self_verify)		(JcatEngine *self,
    							 GBytes		*blob,
    							 GBytes		*blob_signature,
    							 JcatVerifyFlags flags,
    							 GError		**error);
    	JcatBlob		*(*self_sign)		(JcatEngine *self,
    							 GBytes		*blob,
    							 JcatSignFlags flags,
    							 GError		**error);
    	gpointer		 padding[9];
    };

### JcatEngine

    typedef struct _JcatEngine JcatEngine;