File: nonce.h

package info (click to toggle)
pidgin-encryption 3.1-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,916 kB
  • ctags: 961
  • sloc: sh: 10,460; ansic: 8,821; makefile: 376; yacc: 318
file content (37 lines) | stat: -rw-r--r-- 1,466 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*             Nonces for the Pidgin-Encryption plugin                    */
/*            Copyright (C) 2001-2007 William Tompkins                    */

/* This plugin is free software, distributed under the GNU General Public */
/* License.                                                               */
/* Please see the file "COPYING" distributed with this 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.                                                  */

#ifndef NONCE_H
#define NONCE_H

#include "glib.h"

typedef unsigned char Nonce[24];

void PE_nonce_map_init();

void PE_str_to_nonce(Nonce* nonce, char* nonce_str);
gchar* PE_nonce_to_str(Nonce* nonce);

void PE_incr_nonce(Nonce* nonce);

gchar* PE_new_incoming_nonce(const char* name);
int PE_check_incoming_nonce(const char* name, char* nonce_str);

int PE_nonce_str_len();

#endif