ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rsafun.h
Go to the documentation of this file.
1 /* @(#)root/auth:$Id$ */
2 /* Author: Martin Nicolay 22/11/1988 */
3 
4 /******************************************************************************
5 Copyright (C) 2006 Martin Nicolay <m.nicolay@osm-gmbh.de>
6 
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later
11 version.
12 
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free
20 Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21 MA 02110-1301 USA
22 ******************************************************************************/
23 
24 /*******************************************************************************
25 * *
26 * Simple RSA public key code. *
27 * Adaptation in library for ROOT by G. Ganis, July 2003 *
28 * (gerardo.ganis@cern.ch) *
29 * *
30 * Header used by internal rsa functions *
31 * *
32 *******************************************************************************/
33 
34 #include <stdio.h>
35 
36 #ifndef ROOT_rsafun
37 #define ROOT_rsafun
38 
39 #ifndef _RSADEF_H
40 #include "rsadef.h"
41 #endif
42 
43 
44 typedef rsa_NUMBER (*RSA_genprim_t)(int, int);
45 typedef int (*RSA_genrsa_t)(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *);
46 typedef int (*RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
47 typedef int (*RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
48 typedef int (*RSA_num_sput_t)(rsa_NUMBER*, char*, int );
49 typedef int (*RSA_num_fput_t)(rsa_NUMBER*, FILE* );
50 typedef int (*RSA_num_sget_t)(rsa_NUMBER*, char* );
51 typedef int (*RSA_num_fget_t)(rsa_NUMBER*, FILE* );
52 typedef void (*RSA_assign_t)(rsa_NUMBER *, rsa_NUMBER *);
53 typedef int (*RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *);
54 
55 
56 class TRSA_fun {
57 
58 private:
69 
70 public:
71  static RSA_genprim_t RSA_genprim();
72  static RSA_genrsa_t RSA_genrsa();
73  static RSA_encode_t RSA_encode();
74  static RSA_decode_t RSA_decode();
79  static RSA_assign_t RSA_assign();
80  static RSA_cmp_t RSA_cmp();
81 
84 };
85 
86 #endif
int(* RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:46
int(* RSA_num_fput_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:49
static RSA_num_sput_t RSA_num_sput()
Definition: rsafun.cxx:60
int(* RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:47
int(* RSA_num_fget_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:51
static RSA_encode_t fg_rsa_encode
Definition: rsafun.h:61
static RSA_decode_t RSA_decode()
Definition: rsafun.cxx:59
static RSA_genrsa_t fg_rsa_genrsa
Definition: rsafun.h:60
static RSA_num_fget_t RSA_num_fget()
Definition: rsafun.cxx:63
static RSA_num_sget_t RSA_num_sget()
Definition: rsafun.cxx:62
rsa_NUMBER(* RSA_genprim_t)(int, int)
Definition: rsafun.h:44
static RSA_assign_t RSA_assign()
Definition: rsafun.cxx:64
static RSA_assign_t fg_rsa_assign
Definition: rsafun.h:67
static RSA_num_fput_t fg_rsa_num_fput
Definition: rsafun.h:64
int(* RSA_genrsa_t)(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:45
static RSA_genprim_t RSA_genprim()
Definition: rsafun.cxx:56
int(* RSA_num_sget_t)(rsa_NUMBER *, char *)
Definition: rsafun.h:50
static RSA_genprim_t fg_rsa_genprim
Definition: rsafun.h:59
static RSA_num_sget_t fg_rsa_num_sget
Definition: rsafun.h:65
static RSA_cmp_t RSA_cmp()
Definition: rsafun.cxx:65
static RSA_cmp_t fg_rsa_cmp
Definition: rsafun.h:68
void(* RSA_assign_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:52
static RSA_num_fget_t fg_rsa_num_fget
Definition: rsafun.h:66
int(* RSA_num_sput_t)(rsa_NUMBER *, char *, int)
Definition: rsafun.h:48
typedef void((*Func_t)())
static RSA_decode_t fg_rsa_decode
Definition: rsafun.h:62
TRSA_fun(RSA_genprim_t, RSA_genrsa_t, RSA_encode_t, RSA_decode_t, RSA_num_sput_t, RSA_num_fput_t, RSA_num_sget_t, RSA_num_fget_t, RSA_assign_t, RSA_cmp_t)
Definition: rsafun.cxx:72
static RSA_num_fput_t RSA_num_fput()
Definition: rsafun.cxx:61
static RSA_encode_t RSA_encode()
Definition: rsafun.cxx:58
static RSA_genrsa_t RSA_genrsa()
Definition: rsafun.cxx:57
static RSA_num_sput_t fg_rsa_num_sput
Definition: rsafun.h:63
int(* RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:53