ekg2
GIT master
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
plugins
sim
simlite.h
Idź do dokumentacji tego pliku.
1
/* $Id$ */
2
3
/*
4
* (C) Copyright 2003 Wojtek Kaniewski <wojtekka@irc.pl>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License Version
8
* 2.1 as published by the Free Software Foundation.
9
*
10
* This program 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
13
* GNU Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
*/
19
20
#ifndef __SIMLITE_H
21
#define __SIMLITE_H
22
23
extern
char
*
sim_key_path
;
24
extern
int
sim_errno
;
25
26
typedef
enum
{
27
SIM_ERROR_SUCCESS
,
/* udało się */
28
SIM_ERROR_PUBLIC
,
/* błąd klucza publicznego */
29
SIM_ERROR_PRIVATE
,
/* błąd klucza prywatnego */
30
SIM_ERROR_RSA
,
/* nie udało się odszyfrować RSA */
31
SIM_ERROR_BF
,
/* nie udało się odszyfrować BF */
32
SIM_ERROR_RAND
,
/* entropia poszła na piwo */
33
SIM_ERROR_MEMORY
,
/* brak pamięci */
34
SIM_ERROR_INVALID
,
/* niewłaściwa wiadomość (za krótka) */
35
SIM_ERROR_MAGIC
/* niewłaściwy magic */
36
}
sim_errno_t
;
37
38
#define SIM_MAGIC_V1 0x2391
39
#define SIM_MAGIC_V1_BE 0x9123
40
41
typedef
struct
{
42
unsigned
char
init[8];
43
guint16
magic
;
44
guint8
flags
;
45
}
46
#ifdef __GNUC__
47
__attribute__
((packed))
48
#endif
49
sim_message_header
;
50
51
char
*
sim_message_decrypt
(
const
unsigned
char
*message,
const
char
*uid);
52
char
*
sim_message_encrypt
(
const
unsigned
char
*message,
const
char
*uid);
53
int
sim_key_generate
(
const
char
*uid);
54
char
*
sim_key_fingerprint
(
const
char
*uid);
55
56
const
char
*
sim_strerror
(
int
error);
57
58
#endif
/* __SIMLITE_H */
59
60
/*
61
* Local Variables:
62
* mode: c
63
* c-file-style: "k&r"
64
* c-basic-offset: 8
65
* indent-tabs-mode: t
66
* End:
67
*/
Wygenerowano Wt, 29 paź 2013 20:17:04 dla ekg2 programem
1.8.4