xrootd
XrdCryptoAux.hh
Go to the documentation of this file.
1 // $Id$
2 #ifndef __CRYPTO_AUX_H__
3 #define __CRYPTO_AUX_H__
4 
5 #include <stdio.h>
6 #ifndef WIN32
8 #endif
9 #include <XProtocol/XProtocol.hh>
10 
11 /******************************************************************************/
12 /* M i s c e l l a n e o u s D e f i n e s */
13 /******************************************************************************/
14 #define ABSTRACTMETHOD(x) {cerr <<"Method "<<x<<" must be overridden!" <<endl;}
15 
16 /******************************************************************************/
17 /* E r r o r L o g g i n g / T r a c i n g F l a g s */
18 /******************************************************************************/
19 #define cryptoTRACE_ALL 0x0007
20 #define cryptoTRACE_Dump 0x0004
21 #define cryptoTRACE_Debug 0x0002
22 #define cryptoTRACE_Notify 0x0001
23 
24 // RSA parameters
25 #define XrdCryptoMinRSABits 512
26 #define XrdCryptoDefRSABits 1024
27 #define XrdCryptoDefRSAExp 0x10001
28 
29 /******************************************************************************/
30 /* U t i l i t y F u n c t i o n s */
31 /******************************************************************************/
32 typedef int (*XrdCryptoKDFunLen_t)();
33 typedef int (*XrdCryptoKDFun_t)(const char *pass, int plen,
34  const char *salt, int slen,
35  char *key, int klen);
36 int XrdCryptoKDFunLen();
37 int XrdCryptoKDFun(const char *pass, int plen, const char *salt, int slen,
38  char *key, int klen);
39 
40 
41 /******************************************************************************/
42 /* X r d C r y p t o S e t T r a c e */
43 /* */
44 /* Set trace flags according to 'trace' */
45 /* */
46 /******************************************************************************/
47 //______________________________________________________________________________
48 void XrdCryptoSetTrace(kXR_int32 trace);
49 
50 #endif