Logo ROOT   6.18/05
Reference Guide
rsafun.h
Go to the documentation of this file.
1/* @(#)root/auth:$Id$ */
2/* Author: Martin Nicolay 22/11/1988 */
3
4/******************************************************************************
5Copyright (C) 2006 Martin Nicolay <m.nicolay@osm-gmbh.de>
6
7This library is free software; you can redistribute it and/or
8modify it under the terms of the GNU Lesser General Public
9License as published by the Free Software Foundation; either
10version 2.1 of the License, or (at your option) any later
11version.
12
13This library is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU Lesser General Public License for more details.
17
18You should have received a copy of the GNU Lesser General Public
19License along with this library; if not, write to the Free
20Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
21MA 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
42typedef rsa_NUMBER (*RSA_genprim_t)(int, int);
44typedef int (*RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
45typedef int (*RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER);
46typedef int (*RSA_num_sput_t)(rsa_NUMBER*, char*, int );
47typedef int (*RSA_num_fput_t)(rsa_NUMBER*, FILE* );
48typedef int (*RSA_num_sget_t)(rsa_NUMBER*, char* );
49typedef int (*RSA_num_fget_t)(rsa_NUMBER*, FILE* );
51typedef int (*RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *);
52
53
54class TRSA_fun {
55
56private:
67
68public:
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
typedef void((*Func_t)())
static RSA_encode_t RSA_encode()
Definition: rsafun.cxx:58
static RSA_genprim_t RSA_genprim()
Definition: rsafun.cxx:56
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_cmp_t fg_rsa_cmp
Definition: rsafun.h:66
static RSA_genrsa_t fg_rsa_genrsa
Definition: rsafun.h:58
static RSA_genprim_t fg_rsa_genprim
Definition: rsafun.h:57
static RSA_assign_t RSA_assign()
Definition: rsafun.cxx:64
static RSA_cmp_t RSA_cmp()
Definition: rsafun.cxx:65
static RSA_decode_t fg_rsa_decode
Definition: rsafun.h:60
static RSA_decode_t RSA_decode()
Definition: rsafun.cxx:59
static RSA_genrsa_t RSA_genrsa()
Definition: rsafun.cxx:57
static RSA_num_sput_t fg_rsa_num_sput
Definition: rsafun.h:61
static RSA_num_fput_t fg_rsa_num_fput
Definition: rsafun.h:62
static RSA_num_fget_t fg_rsa_num_fget
Definition: rsafun.h:64
static RSA_num_fput_t RSA_num_fput()
Definition: rsafun.cxx:61
static RSA_num_sput_t RSA_num_sput()
Definition: rsafun.cxx: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
static RSA_encode_t fg_rsa_encode
Definition: rsafun.h:59
static RSA_assign_t fg_rsa_assign
Definition: rsafun.h:65
static RSA_num_sget_t fg_rsa_num_sget
Definition: rsafun.h:63
int(* RSA_cmp_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:51
int(* RSA_num_sput_t)(rsa_NUMBER *, char *, int)
Definition: rsafun.h:46
rsa_NUMBER(* RSA_genprim_t)(int, int)
Definition: rsafun.h:42
int(* RSA_num_fget_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:49
int(* RSA_num_sget_t)(rsa_NUMBER *, char *)
Definition: rsafun.h:48
int(* RSA_encode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:44
void(* RSA_assign_t)(rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:50
int(* RSA_decode_t)(char *, int, rsa_NUMBER, rsa_NUMBER)
Definition: rsafun.h:45
int(* RSA_genrsa_t)(rsa_NUMBER, rsa_NUMBER, rsa_NUMBER *, rsa_NUMBER *, rsa_NUMBER *)
Definition: rsafun.h:43
int(* RSA_num_fput_t)(rsa_NUMBER *, FILE *)
Definition: rsafun.h:47