Logo ROOT   6.12/07
Reference Guide
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 #include "rsadef.h"
40 
41 
42 typedef rsa_NUMBER (*RSA_genprim_t)(int, int);
43 typedef int (*RSA_genrsa_t)(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *);
44 typedef int (*RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
45 typedef int (*RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
46 typedef int (*RSA_num_sput_t)(rsa_NUMBER*, char*, int );
47 typedef int (*RSA_num_fput_t)(rsa_NUMBER*, FILE* );
48 typedef int (*RSA_num_sget_t)(rsa_NUMBER*, char* );
49 typedef int (*RSA_num_fget_t)(rsa_NUMBER*, FILE* );
50 typedef void (*RSA_assign_t)(rsa_NUMBER *, rsa_NUMBER *);
51 typedef int (*RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *);
52 
53 
54 class TRSA_fun {
55 
56 private:
67 
68 public:
69  static RSA_genprim_t RSA_genprim();
70  static RSA_genrsa_t RSA_genrsa();
71  static RSA_encode_t RSA_encode();
72  static RSA_decode_t RSA_decode();
77  static RSA_assign_t RSA_assign();
78  static RSA_cmp_t RSA_cmp();
79 
82 };
83 
84 #endif
void(* RSA_assign_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:50
static RSA_num_sput_t RSA_num_sput()
Definition: rsafun.cxx:60
int(* RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:44
static RSA_encode_t fg_rsa_encode
Definition: rsafun.h:59
static RSA_decode_t RSA_decode()
Definition: rsafun.cxx:59
static RSA_genrsa_t fg_rsa_genrsa
Definition: rsafun.h:58
static RSA_num_fget_t RSA_num_fget()
Definition: rsafun.cxx:63
static RSA_num_sget_t RSA_num_sget()
Definition: rsafun.cxx:62
static RSA_assign_t RSA_assign()
Definition: rsafun.cxx:64
static RSA_assign_t fg_rsa_assign
Definition: rsafun.h:65
static RSA_num_fput_t fg_rsa_num_fput
Definition: rsafun.h:62
int(* RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:45
static RSA_genprim_t RSA_genprim()
Definition: rsafun.cxx:56
static RSA_genprim_t fg_rsa_genprim
Definition: rsafun.h:57
static RSA_num_sget_t fg_rsa_num_sget
Definition: rsafun.h:63
static RSA_cmp_t RSA_cmp()
Definition: rsafun.cxx:65
static RSA_cmp_t fg_rsa_cmp
Definition: rsafun.h:66
rsa_NUMBER(* RSA_genprim_t)(int, int)
Definition: rsafun.h:42
int(* RSA_genrsa_t)(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:43
int(* RSA_num_fget_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:49
static RSA_num_fget_t fg_rsa_num_fget
Definition: rsafun.h:64
int(* RSA_num_sput_t)(rsa_NUMBER *, char *, int)
Definition: rsafun.h:46
typedef void((*Func_t)())
int(* RSA_num_sget_t)(rsa_NUMBER *, char *)
Definition: rsafun.h:48
static RSA_decode_t fg_rsa_decode
Definition: rsafun.h:60
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
int(* RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:51
static RSA_num_sput_t fg_rsa_num_sput
Definition: rsafun.h:61
int(* RSA_num_fput_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:47