/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Authors: Jeffrey Stedfast * * Copyright 2001 Ximian, Inc. (www.ximian.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * */ #ifndef CAMEL_CIPHER_CONTEXT_H #define CAMEL_CIPHER_CONTEXT_H #include #include #include #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus */ #define CAMEL_CIPHER_CONTEXT_TYPE (camel_cipher_context_get_type ()) #define CAMEL_CIPHER_CONTEXT(obj) (CAMEL_CHECK_CAST((obj), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContext)) #define CAMEL_CIPHER_CONTEXT_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_CIPHER_CONTEXT_TYPE, CamelCipherContextClass)) #define CAMEL_IS_CIPHER_CONTEXT(o) (CAMEL_CHECK_TYPE((o), CAMEL_CIPHER_CONTEXT_TYPE)) typedef struct _CamelCipherValidity CamelCipherValidity; typedef enum { CAMEL_CIPHER_HASH_DEFAULT, CAMEL_CIPHER_HASH_MD2, CAMEL_CIPHER_HASH_MD5, CAMEL_CIPHER_HASH_SHA1 } CamelCipherHash; typedef struct _CamelCipherContext { CamelObject parent_object; struct _CamelCipherContextPrivate *priv; CamelSession *session; } CamelCipherContext; typedef struct _CamelCipherContextClass { CamelObjectClass parent_class; int (*sign) (CamelCipherContext *ctx, const char *userid, CamelCipherHash hash, CamelStream *istream, CamelStream *ostream, CamelException *ex); int (*clearsign) (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelStream *istream, CamelStream *ostream, CamelException *ex); CamelCipherValidity * (*verify) (CamelCipherContext *context, CamelCipherHash hash, CamelStream *istream, CamelStream *sigstream, CamelException *ex); int (*encrypt) (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients, CamelStream *istream, CamelStream *ostream, CamelException *ex); int (*decrypt) (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream, CamelException *ex); } CamelCipherContextClass; CamelType camel_cipher_context_get_type (void); CamelCipherContext *camel_cipher_context_new (CamelSession *session); void camel_cipher_context_construct (CamelCipherContext *context, CamelSession *session); /* cipher routines */ int camel_cipher_sign (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelStream *istream, CamelStream *ostream, CamelException *ex); int camel_cipher_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelStream *istream, CamelStream *ostream, CamelException *ex); CamelCipherValidity *camel_cipher_verify (CamelCipherContext *context, CamelCipherHash hash, CamelStream *istream, CamelStream *sigstream, CamelException *ex); int camel_cipher_encrypt (CamelCipherContext *context, gboolean sign, const char *userid, GPtrArray *recipients, CamelStream *istream, CamelStream *ostream, CamelException *ex); int camel_cipher_decrypt (CamelCipherContext *context, CamelStream *istream, CamelStream *ostream, CamelException *ex); /* CamelCipherValidity utility functions */ CamelCipherValidity *camel_cipher_validity_new (void); void camel_cipher_validity_init (CamelCipherValidity *validity); gboolean camel_cipher_validity_get_valid (CamelCipherValidity *validity); void camel_cipher_validity_set_valid (CamelCipherValidity *validity, gboolean valid); char *camel_cipher_validity_get_description (CamelCipherValidity *validity); void camel_cipher_validity_set_description (CamelCipherValidity *validity, const char *description); void camel_cipher_validity_clear (CamelCipherValidity *validity); void camel_cipher_validity_free (CamelCipherValidity *validity); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CAMEL_CIPHER_CONTEXT_H */ ME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* .gitauthors: Add Nuno Eduardo Simões Leal Teixeira (eduardo)Joseph Mingrone2021-01-291-0/+1
* .gitauthors: Add Lewis Cook (lcook)Joseph Mingrone2021-01-221-0/+1
* .gitauthors: Add Neel Chauhan (nc)Joseph Mingrone2021-01-051-0/+1
* .gitauthors: Add Juraj Lutter (otis)Joseph Mingrone2020-12-161-0/+1
* .gitauthors: Chase nyan's name updateJoseph Mingrone2020-12-141-1/+1
* .gitauthors: Add Rainer Hurling (rhurlin)Joseph Mingrone2020-08-311-0/+1
* .gitauthors: Add Daniel Ebdrup Jensen (debdrup)Joseph Mingrone2020-07-261-0/+1
* .gitauthors: Add Robert Wing (rew)Joseph Mingrone2020-07-251-0/+1
* .gitauthors: Add Gordon Bergling (bge)Joseph Mingrone2020-06-091-0/+1
* .gitauthors: Add Hiroki Tagato (tagattie)Joseph Mingrone2020-04-081-0/+1
* .gitauthors: Add Richard Scheffenegger (rscheff)Joseph Mingrone2020-04-071-0/+1
* .gitauthors: Chase update for seJoseph Mingrone2020-04-011-1/+1
* .gitauthors: Chase first name update for jrtc27Joseph Mingrone2020-04-011-1/+1
* .gitauthors: Chase last name update for uqsJoseph Mingrone2020-04-011-1/+1
* .gitauthors: Add Aleksandr Fedorov (afedorov)Joseph Mingrone2020-03-191-0/+1
* .gitauthors: Add Nick O'Brien (nick)Joseph Mingrone2020-03-111-0/+1
* .gitauthors: Add Lorenzo Salvadore (salvadore)Joseph Mingrone2020-02-211-0/+1
* .gitauthors: Add Ryan Moeller (freqlabs)Joseph Mingrone2020-02-111-0/+1
* .gitauthors: Add Alfredo Dal'Ava Junior (alfredo)Joseph Mingrone2020-01-291-0/+1
* .gitauthors: Add James Clarke (jrtc27)Joseph Mingrone2020-01-231-0/+1
* .gitauthors: Add Mikael Urankar (mikael)Joseph Mingrone2020-01-171-0/+1
* .gitauthors: Add Loïc Bartoletti (lbartoletti)Joseph Mingrone2020-01-071-0/+1
* .gitauthors: Add Oleksii Samorukov (samm)Joseph Mingrone2019-10-091-0/+1
* .gitauthors: Add Pawel Biernacki (kaktus)Joseph Mingrone2019-09-271-0/+1
* .gitauthors: Add Dmitri Goutnik (dmgk)Joseph Mingrone2019-09-161-0/+1
* .gitauthors: Add Stephen Gregoratto (sg)Joseph Mingrone2019-09-111-0/+1
* .gitauthors: Add Santhosh Raju (fox)Joseph Mingrone2019-09-011-0/+1
* .gitauthors: Add Chuck Silvers (chs)Joseph Mingrone2019-06-211-0/+1
* .gitauthors: Add Brandon Bergren (bdragon)Joseph Mingrone2019-06-011-0/+1
* .gitauthors: Add D Scott Phillips (scottph)Joseph Mingrone2019-05-311-0/+1
* .gitauthors: Add Sergio Carlavilla Delgado (carlavilla)Joseph Mingrone2019-05-211-0/+1
* .gitauthors: Update dougm's nameJoseph Mingrone2019-05-091-1/+1
* .gitauthors: Add Douglas William Moore (dougm)Joseph Mingrone2019-05-021-0/+1
* .gitauthors: Add Piotr Kubaj (pkubaj)Joseph Mingrone2019-04-151-0/+1
* .gitauthors: Add Mitchell Horne (mhorne)Joseph Mingrone2019-03-221-0/+1
* .gitauthors: Add Johannes Lundberg (johalun)Joseph Mingrone2019-02-071-0/+1
* .gitauthors: Add Kai Knoblich (kai)Joseph Mingrone2019-02-011-0/+1
* .gitauthors: Update Enji Cooper's (ngie) entryJoseph Mingrone2018-12-241-1/+1
* .gitauthors: Add Thomas Munro (tmunro)Joseph Mingrone2018-10-161-0/+1
* .gitauthors: Add Yuri Pankov (yuripv)Joseph Mingrone2018-10-101-0/+1
* .gitauthors: Add Vinícius Zavam (egypcio)Joseph Mingrone2018-10-041-0/+1
* .gitauthors: Add Alexandre C. Guimarães (rigoletto)Joseph Mingrone2018-10-031-0/+1
* .gitauthors: Add Serhii Kozlov (skozlov)Joseph Mingrone2018-09-211-0/+1
* .gitauthors: Add Kevin Bowling (kbowling)Joseph Mingrone2018-09-031-0/+1
* .gitauthors: Add John Hixon (jhixson)Joseph Mingrone2018-07-161-0/+1
* .gitauthors: Add Ben Widawsky (bwidawsk)Joseph Mingrone2018-07-051-0/+1
* .gitauthors: Add Jesper Schmitz Mouridsen (jsm)Joseph Mingrone2018-07-051-0/+1
* .gitauthors: Ensure all accounts have a nameJoseph Mingrone2018-07-021-4/+4
* .gitauthors: Add Mateusz Piotrowski (0mp)Joseph Mingrone2018-06-171-0/+1
* .gitauthors: Add Breno Leitao (leitao) and Leandro Lupori (luporl)Joseph Mingrone2018-05-221-0/+2
* .gitauthors: Add Gleb Popov (arrowd)Joseph Mingrone2018-05-181-0/+1
* .gitauthors: Add Matt Macy (mmacy)Joseph Mingrone2018-05-041-0/+1
* .gitauthors: Add Rebecca Cran (bcran)Joseph Mingrone2018-04-231-0/+1