亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? encrypt.c

?? 一個windows上的加解密程式 提供方便的介面讓使用者操作
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*                    Gaim encryption plugin                              *//*             Copyright (C) 2001-2003 William Tompkins                   *//* This plugin is free software, distributed under the GNU General Public *//* License.                                                               *//* Please see the file "COPYING" distributed with the Gaim source code    *//* for more details                                                       *//*                                                                        *//*                                                                        *//*    This software 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.                             *//*   To compile and use:                                                  *//*     See INSTALL file.                                                  */#include "gaim-encryption-config.h"#include <gdk/gdk.h>#include <gtk/gtkplug.h>#include <config.h>#include <debug.h>#include <gaim.h>#include <core.h>#include <gtkutils.h>#include <gtkplugin.h>#include <gtkconv.h>#include <gtkdialogs.h>#include <gtkprefs.h>#include <blist.h>#include <gtkblist.h>#include <signals.h>#include <util.h>#include <version.h>#include <internal.h>#include "cryptproto.h"#include "cryptutil.h"#include "state.h"#include "state_ui.h"#include "keys.h"#include "nonce.h"#include "prefs.h"#include "config_ui.h"#include "ge_blist.h"#include "encrypt.h"#include "nls.h"#include <time.h>#include <sys/types.h>#include <sys/time.h>#include <string.h>#include <unistd.h>#include <math.h>#include <ctype.h>#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <errno.h>#ifdef HAVE_ALLOCA_H#include <alloca.h>#endif#ifdef _WIN32#include "win32dep.h"#endif/* from Gaim's internal.h, but it isn't critical that it is in sync: *//* #define BUF_LONG 4096 */G_MODULE_IMPORT GSList *gaim_accounts;G_MODULE_IMPORT guint im_options;#define ENCRYPT_PLUGIN_ID "gtk-obobo-gaim-encryption"/* Types */struct msg_node {   char who[64];   time_t time;   GaimConnection* gc;   struct msg_node* next;   unsigned char msg[1];};typedef struct msg_node msg_node;GaimPlugin *GE_plugin_handle;/* Outgoing message queue (waiting on a public key to encrypt) */static msg_node* first_out_msg = 0;static msg_node* last_out_msg = 0;/* Incoming message queue (waiting on a public key to verify) */static msg_node* first_inc_msg = 0;static msg_node* last_inc_msg = 0;static int GE_get_msg_size_limit(GaimAccount*);static void GE_send_key(GaimAccount *, const char *name, int, char*);static crypt_key * GE_get_key(GaimConnection *, const char *name);static int decrypt_msg(unsigned char **decrypted, unsigned char *msg,                       const unsigned char *name, crypt_key *, crypt_key *);static void GE_store_msg(const char *name, GaimConnection*, char *,                         msg_node**, msg_node**);static void got_encrypted_msg(GaimConnection *, const char *name, char **);static void reap_all_sent_messages(GaimConversation*);static void reap_old_sent_messages(GaimConversation*);/* Function pointers exported to Gaim */static gboolean GE_got_msg_cb(GaimAccount *, char **, char **, GaimConvImFlags flags, void *);static void GE_send_msg_cb(GaimAccount *, char *, char **, void *);static void GE_new_conv_cb(GaimConversation *, void *);static void GE_del_conv_cb(GaimConversation *, void *);static GHashTable *header_table, *footer_table, *notify_table;static gchar* header_default;/* #define CRYPT_HEADER "*** Encrypted with the Gaim-Encryption plugin <A HREF=\"" *//* #define CRYPT_FOOTER "\"></A>" *//* #define CRYPT_NOTIFY_HEADER "<A HREF=\"Gaim-Encryption Capable\"></A>" */// Jabber seems to turn our double quotes into single quotes at times, so define// the same headers, only with single quotes.  Lengths MUST be the same as above/* #define CRYPT_HEADER_MANGLED "*** Encrypted with the Gaim-Encryption plugin <A HREF='" *//* #define CRYPT_NOTIFY_HEADER_MANGLED "<A HREF='Gaim-Encryption Capable'></A>" *//* Send key to other side.  If msg_id is non-null, we include a request to re-send *//* a certain message, as well.                                                     */static void GE_send_key(GaimAccount *acct, const char *name, int asError, gchar *msg_id) {   /* load key somehow */   char *msg;   GString *key_str;   crypt_key *pub_key;   GaimConversation *conv;   int header_size, footer_size;   const gchar* header = g_hash_table_lookup(header_table, gaim_account_get_protocol_id(acct));   const gchar* footer = g_hash_table_lookup(footer_table, gaim_account_get_protocol_id(acct));   if (!header) header = header_default;   if (!footer) footer = "";   header_size = strlen(header);   footer_size = strlen(footer);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "send_key: %s\n", acct->username);      conv = gaim_find_conversation_with_account(name, acct);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "send_key: %s, %p, %s\n", name, conv, acct->username);   pub_key = GE_find_own_key_by_name(&GE_my_pub_ring, acct->username, acct, conv);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "send_key2: %s\n", acct->username);   if (!pub_key) return;   key_str = GE_make_sendable_key(pub_key, name);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "send_key3: %s\n", acct->username);   msg = alloca(header_size + footer_size + key_str->len + 100);   if (msg == 0) return;   if (asError) {      if (msg_id) {         sprintf(msg, "%s: ErrKey: Prot %s: Len %d:%sResend:%s:%s", header,                 pub_key->proto->name, (int)key_str->len, key_str->str, msg_id, footer);      } else {         sprintf(msg, "%s: ErrKey: Prot %s: Len %d:%s%s", header,                 pub_key->proto->name, (int)key_str->len, key_str->str, footer);      }   } else {      sprintf(msg, "%s: Key: Prot %s: Len %d:%s%s", header,              pub_key->proto->name, (int)key_str->len, key_str->str, footer);   }   if (strlen(msg) > GE_get_msg_size_limit(acct)) {      g_free(msg);      gaim_debug(GAIM_DEBUG_MISC, "gaim-encryption", "Key too big to send in message\n");      conv = gaim_find_conversation_with_account(name, acct);      if (conv == NULL) {         conv = gaim_conversation_new(GAIM_CONV_IM, acct, name);      }      gaim_conversation_write(conv, 0,                              _("This account key is too large for this protocol. "                                "Unable to send."),                              GAIM_MESSAGE_SYSTEM, time((time_t)NULL));      return;   }   serv_send_im(acct->gc, name, msg, GAIM_CONNECTION_AUTO_RESP);   g_string_free(key_str, TRUE);}static crypt_key *GE_get_key(GaimConnection *gc, const char *name) {   crypt_key *bkey;   unsigned char* tmpmsg;   int header_size, footer_size;   const gchar* header = g_hash_table_lookup(header_table, gaim_account_get_protocol_id(gc->account));   const gchar* footer = g_hash_table_lookup(footer_table, gaim_account_get_protocol_id(gc->account));   if (!header) header = header_default;   if (!footer) footer = "";   header_size = strlen(header);   footer_size = strlen(footer);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "get_key: %s\n", name);   bkey = GE_find_key_by_name(GE_buddy_ring, name, gc->account);   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "got key: %p\n", bkey);   if( bkey == 0 ) {      tmpmsg = alloca(header_size + footer_size +                      sizeof (": Send Key")); // sizeof() gets the trailing null too      sprintf(tmpmsg, "%s%s%s", header, ": Send Key", footer);      gaim_debug(GAIM_DEBUG_MISC, "gaim-encryption", "Sending: %s\n", tmpmsg);      serv_send_im(gc, name, tmpmsg, GAIM_CONNECTION_AUTO_RESP);      return 0;   }   return bkey;}static int decrypt_msg(unsigned char **decrypted, unsigned char *msg, const unsigned char *name,                        crypt_key *priv_key, crypt_key *pub_key) {   int realstart = 0;	unsigned int length;   int retval;   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "decrypt_msg\n");   if ( (sscanf(msg, ": Len %u:%n", &length, &realstart) < 1) || (realstart == 0)) {      gaim_debug(GAIM_DEBUG_ERROR, "gaim-encryption", "Garbled length in decrypt\n");      return -1;   }   msg += realstart;   if (strlen(msg) < length) {      gaim_debug(GAIM_DEBUG_ERROR, "gaim-encryption", "Length doesn't match in decrypt\n");      return -1;   }   msg[length] = 0;      retval = GE_decrypt_signed(decrypted, msg, priv_key, pub_key, name);      return retval;}static void GE_store_msg(const char *who, GaimConnection *gc, char *msg, msg_node** first_node,               msg_node** last_node) {   msg_node* newnode;      newnode = g_malloc(sizeof(msg_node) + strlen(msg));      gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "store_msg: %p : %s\n", newnode, who);   strncpy(newnode->who, gaim_normalize(gc->account, who), sizeof(newnode->who));   newnode->who[sizeof(newnode->who)-1] = 0;   newnode->gc = gc;   newnode->time = time((time_t)NULL);   strcpy(newnode->msg, msg);   newnode->next = 0;      if (*first_node == 0) {      *last_node = newnode;      *first_node = newnode;   } else {      (*last_node)->next = newnode;      *last_node = newnode;   }   for (newnode = *first_node; newnode != *last_node; newnode = newnode->next) {      gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "   In store stack: %p\n",                 newnode, newnode->who);   }   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "   In store stack: %p\n",              *last_node, (*last_node)->who);}void GE_send_stored_msgs(GaimAccount* acct, const char* who) {   msg_node* node = first_out_msg;   msg_node* prev = 0;   char *tmp_msg;   gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption", "send_stored_msgs\n");   while (node != 0) {      gaim_debug(GAIM_DEBUG_INFO, "gaim-encryption",                 "Looking for stored msg:%s:%s\n",node->who, who);      if ((strcmp(node->who, who) == 0) && (node->gc->account == acct)) {         tmp_msg = g_strdup(node->msg);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆视频观看网址久久| 色琪琪一区二区三区亚洲区| 免费看精品久久片| 欧美日韩国产成人在线免费| 99精品视频中文字幕| 国产精品一区二区视频| 粗大黑人巨茎大战欧美成人| 国产精品一区二区久久精品爱涩| 国产精品中文字幕日韩精品 | 欧美伊人精品成人久久综合97| 成年人网站91| 色香蕉久久蜜桃| 欧美三级在线播放| 91精品国产福利在线观看| 欧美日韩国产区一| 日韩免费观看高清完整版| 久久综合久久综合久久| 国产精品免费视频观看| 亚洲精品国产一区二区三区四区在线| 亚洲美女免费视频| 日韩中文字幕av电影| 国产一区二区三区av电影 | 五月天国产精品| 美女国产一区二区| 国产**成人网毛片九色| 日本电影亚洲天堂一区| 精品国产不卡一区二区三区| 国产精品美女久久久久av爽李琼| 亚洲美女少妇撒尿| 免费人成在线不卡| av影院午夜一区| 日韩欧美精品三级| 亚洲少妇中出一区| 激情综合网激情| 91麻豆自制传媒国产之光| 日韩三级.com| 亚洲乱码国产乱码精品精小说| 日本sm残虐另类| 91女神在线视频| 国产亚洲一二三区| 日本网站在线观看一区二区三区| 国产宾馆实践打屁股91| 欧美伊人久久久久久午夜久久久久| 精品日韩欧美一区二区| 亚洲h精品动漫在线观看| 国产精品 欧美精品| 91精品婷婷国产综合久久竹菊| 亚洲国产精华液网站w| 日韩精品久久久久久| 91丨porny丨蝌蚪视频| 久久精品在线观看| 日本成人在线网站| 精品视频一区三区九区| 亚洲欧洲精品一区二区三区| 国产在线播精品第三| 7777精品伊人久久久大香线蕉的| 国产精品三级av| 国产乱对白刺激视频不卡| 欧美精品视频www在线观看| 中文字幕亚洲成人| 国产91精品久久久久久久网曝门| 日韩欧美三级在线| 日韩高清电影一区| 欧美日韩国产电影| 亚洲成在线观看| 欧美日韩你懂的| 亚洲综合视频在线观看| 日本精品视频一区二区三区| 国产精品免费视频网站| 高清在线成人网| 亚洲国产精品ⅴa在线观看| 国产成人免费视频| 久久久精品日韩欧美| 国产一区二区精品在线观看| 欧美xxxxx牲另类人与| 久国产精品韩国三级视频| 日韩色在线观看| 精品一区中文字幕| 久久精品夜夜夜夜久久| 国产成人啪午夜精品网站男同| 国产农村妇女毛片精品久久麻豆 | 欧美精品xxxxbbbb| 午夜电影一区二区三区| 欧美日本精品一区二区三区| 视频一区国产视频| 日韩欧美不卡在线观看视频| 国产美女在线观看一区| 国产精品污www在线观看| 99精品久久只有精品| 一区二区三区在线播| 欧美精品三级在线观看| 久久国产剧场电影| 久久午夜色播影院免费高清| 成人v精品蜜桃久久一区| 亚洲午夜羞羞片| 久久综合色婷婷| 91视频xxxx| 日本不卡免费在线视频| 欧美国产亚洲另类动漫| 在线观看亚洲精品视频| 奇米亚洲午夜久久精品| 国产欧美日韩视频一区二区| 色天使色偷偷av一区二区| 日韩avvvv在线播放| 日本一区二区三区四区在线视频| 日本高清不卡视频| 激情深爱一区二区| 亚洲综合小说图片| 国产亚洲一本大道中文在线| 欧美视频完全免费看| 国产福利一区在线| 亚洲图片欧美一区| 欧美极品美女视频| 3atv在线一区二区三区| 99精品视频在线免费观看| 麻豆成人91精品二区三区| 亚洲美女屁股眼交3| www国产精品av| 欧美日韩国产首页在线观看| 成人精品国产一区二区4080| 免费国产亚洲视频| 一区二区在线观看免费| 久久久久亚洲蜜桃| 欧美一区二区观看视频| 色欧美片视频在线观看在线视频| 久久99精品久久只有精品| 亚洲国产日韩一级| 中文字幕亚洲精品在线观看| 精品播放一区二区| 91精品中文字幕一区二区三区| 色综合天天综合| 成人av电影免费在线播放| 久久99精品久久久久| 香港成人在线视频| 亚洲女性喷水在线观看一区| 国产欧美一区二区精品久导航 | 制服丝袜日韩国产| 日本久久一区二区三区| av电影在线观看完整版一区二区| 国内一区二区视频| 九一久久久久久| 喷水一区二区三区| 日本成人在线不卡视频| 亚洲一二三四在线| 亚洲综合在线五月| 亚洲精品日韩一| 一区二区三区四区乱视频| 亚洲视频一区二区免费在线观看| 国产精品热久久久久夜色精品三区 | av电影在线观看一区| 成人黄色网址在线观看| 国产成人av在线影院| 国产精品18久久久久久久久| 国产麻豆精品视频| 国产精品羞羞答答xxdd | 伊人色综合久久天天| 亚洲男人天堂一区| 亚洲国产成人tv| 日韩不卡手机在线v区| 舔着乳尖日韩一区| 美女精品一区二区| 国产河南妇女毛片精品久久久| 国产精品亚洲一区二区三区妖精| 国产99精品在线观看| 99久久国产免费看| 欧美日韩久久久| 日韩一区二区三区三四区视频在线观看 | 99久久99久久久精品齐齐| 97久久人人超碰| 欧美日韩国产天堂| 精品嫩草影院久久| 国产三级欧美三级日产三级99| 国产精品美女久久久久久久久 | 久久精品国产一区二区| 国产精品一区二区在线观看不卡 | 国产色婷婷亚洲99精品小说| 一区二区中文视频| 午夜电影网一区| 高清不卡在线观看av| 在线观看区一区二| 亚洲精品一线二线三线无人区| 国产精品久久久久永久免费观看 | 亚洲一区二区在线免费看| 视频在线在亚洲| 国产 日韩 欧美大片| 欧美三级日韩三级国产三级| 久久综合久久综合亚洲| 亚洲精品视频自拍| 美女国产一区二区| 色哟哟欧美精品| 久久一留热品黄| 一区二区三区中文字幕电影| 久久国产精品露脸对白| av不卡免费在线观看| 亚洲天堂精品在线观看| 麻豆一区二区三| 亚洲欧美另类图片小说| 麻豆高清免费国产一区| 欧美午夜免费电影| 中文字幕精品一区二区三区精品|