1 /* Nonces for the Pidgin-Encryption plugin */ 2 /* Copyright (C) 2001-2007 William Tompkins */ 3 4 /* This plugin is free software, distributed under the GNU General Public */ 5 /* License. */ 6 /* Please see the file "COPYING" distributed with this source code */ 7 /* for more details */ 8 /* */ 9 /* */ 10 /* This software is distributed in the hope that it will be useful, */ 11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ 13 /* General Public License for more details. */ 14 15 /* To compile and use: */ 16 /* See INSTALL file. */ 17 18 #ifndef NONCE_H 19 #define NONCE_H 20 21 #include "glib.h" 22 23 typedef unsigned char Nonce[24]; 24 25 void PE_nonce_map_init(); 26 27 void PE_str_to_nonce(Nonce* nonce, char* nonce_str); 28 gchar* PE_nonce_to_str(Nonce* nonce); 29 30 void PE_incr_nonce(Nonce* nonce); 31 32 gchar* PE_new_incoming_nonce(const char* name); 33 int PE_check_incoming_nonce(const char* name, char* nonce_str); 34 35 int PE_nonce_str_len(); 36 37 #endif 38