xrootd
|
#include <XrdCryptosslCipher.hh>
Public Member Functions | |
XrdCryptosslCipher (const char *t, int l=0) | |
XrdCryptosslCipher (const char *t, int l, const char *k, int liv, const char *iv) | |
XrdCryptosslCipher (XrdSutBucket *b) | |
XrdCryptosslCipher (int len, char *pub, int lpub, const char *t) | |
XrdCryptosslCipher (const XrdCryptosslCipher &c) | |
virtual | ~XrdCryptosslCipher () |
bool | Finalize (char *pub, int lpub, const char *t) |
void | Cleanup () |
bool | IsValid () |
int | EncOutLength (int l) |
int | DecOutLength (int l) |
char * | Public (int &lpub) |
XrdSutBucket * | AsBucket () |
char * | IV (int &l) const |
bool | IsDefaultLength () const |
void | SetIV (int l, const char *iv) |
int | Encrypt (const char *bin, int lin, char *out) |
int | Decrypt (const char *bin, int lin, char *out) |
char * | RefreshIV (int &l) |
Static Public Member Functions | |
static bool | IsSupported (const char *cip) |
Private Member Functions | |
void | GenerateIV () |
int | EncDec (int encdec, const char *bin, int lin, char *out) |
void | PrintPublic (BIGNUM *pub) |
int | Publen () |
Private Attributes | |
char * | fIV |
int | lIV |
const EVP_CIPHER * | cipher |
EVP_CIPHER_CTX | ctx |
DH * | fDH |
bool | deflength |
bool | valid |
XrdCryptosslCipher::XrdCryptosslCipher | ( | const char * | t, |
int | l = 0 |
||
) |
References cipher, ctx, deflength, fDH, fIV, GenerateIV(), XrdSutRndm::GetBuffer(), XrdCryptoBasic::Length(), lIV, XrdCryptoBasic::SetBuffer(), XrdCryptoBasic::SetType(), and valid.
XrdCryptosslCipher::XrdCryptosslCipher | ( | const char * | t, |
int | l, | ||
const char * | k, | ||
int | liv, | ||
const char * | iv | ||
) |
References XrdCryptoBasic::Buffer(), cipher, ctx, deflength, fDH, fIV, XrdCryptoBasic::Length(), lIV, XrdCryptoBasic::SetBuffer(), SetIV(), XrdCryptoBasic::SetType(), and valid.
XrdCryptosslCipher::XrdCryptosslCipher | ( | XrdSutBucket * | b | ) |
XrdCryptosslCipher::XrdCryptosslCipher | ( | int | len, |
char * | pub, | ||
int | lpub, | ||
const char * | t | ||
) |
References cipher, Cleanup(), ctx, DEBUG, deflength, EPNAME, fDH, fIV, kDHMINBITS, XrdCryptoBasic::Length(), lIV, XrdCryptoBasic::SetBuffer(), XrdCryptoBasic::SetType(), and valid.
XrdCryptosslCipher::XrdCryptosslCipher | ( | const XrdCryptosslCipher & | c | ) |
XrdSutBucket * XrdCryptosslCipher::AsBucket | ( | ) | [virtual] |
Reimplemented from XrdCryptoCipher.
References XrdCryptoBasic::Buffer(), fDH, fIV, kXRS_cipher, XrdCryptoBasic::Length(), lIV, XrdCryptoBasic::Type(), and valid.
void XrdCryptosslCipher::Cleanup | ( | ) |
References fDH.
Referenced by Finalize(), XrdCryptosslCipher(), and ~XrdCryptosslCipher().
int XrdCryptosslCipher::DecOutLength | ( | int | l | ) | [virtual] |
Reimplemented from XrdCryptoCipher.
References ctx.
int XrdCryptosslCipher::Decrypt | ( | const char * | bin, |
int | lin, | ||
char * | out | ||
) | [virtual] |
Reimplemented from XrdCryptoCipher.
References EncDec().
int XrdCryptosslCipher::EncDec | ( | int | encdec, |
const char * | bin, | ||
int | lin, | ||
char * | out | ||
) | [private] |
References XrdCryptoBasic::Buffer(), cipher, ctx, DEBUG, deflength, EPNAME, fIV, and XrdCryptoBasic::Length().
int XrdCryptosslCipher::EncOutLength | ( | int | l | ) | [virtual] |
Reimplemented from XrdCryptoCipher.
References ctx.
int XrdCryptosslCipher::Encrypt | ( | const char * | bin, |
int | lin, | ||
char * | out | ||
) | [virtual] |
Reimplemented from XrdCryptoCipher.
References EncDec().
bool XrdCryptosslCipher::Finalize | ( | char * | pub, |
int | lpub, | ||
const char * | t | ||
) | [virtual] |
Reimplemented from XrdCryptoCipher.
References cipher, Cleanup(), ctx, DEBUG, deflength, EPNAME, fDH, XrdCryptoBasic::Length(), XrdCryptoBasic::SetBuffer(), XrdCryptoBasic::SetType(), and valid.
void XrdCryptosslCipher::GenerateIV | ( | ) | [private] |
References fIV, XrdSutRndm::GetBuffer(), and lIV.
Referenced by RefreshIV(), and XrdCryptosslCipher().
bool XrdCryptosslCipher::IsDefaultLength | ( | ) | const [inline, virtual] |
Reimplemented from XrdCryptoCipher.
References deflength.
bool XrdCryptosslCipher::IsSupported | ( | const char * | cip | ) | [static] |
Referenced by XrdCryptosslFactory::SupportedCipher().
bool XrdCryptosslCipher::IsValid | ( | ) | [inline, virtual] |
Reimplemented from XrdCryptoCipher.
References valid.
char* XrdCryptosslCipher::IV | ( | int & | l | ) | const [inline, virtual] |
Reimplemented from XrdCryptoCipher.
void XrdCryptosslCipher::PrintPublic | ( | BIGNUM * | pub | ) | [private] |
References Publen().
int XrdCryptosslCipher::Publen | ( | ) | [private] |
References fDH.
Referenced by PrintPublic(), and Public().
char * XrdCryptosslCipher::Public | ( | int & | lpub | ) | [virtual] |
Reimplemented from XrdCryptoCipher.
char * XrdCryptosslCipher::RefreshIV | ( | int & | l | ) | [virtual] |
Reimplemented from XrdCryptoCipher.
References fIV, GenerateIV(), and lIV.
void XrdCryptosslCipher::SetIV | ( | int | l, |
const char * | iv | ||
) | [virtual] |
const EVP_CIPHER* XrdCryptosslCipher::cipher [private] |
Referenced by EncDec(), Finalize(), and XrdCryptosslCipher().
EVP_CIPHER_CTX XrdCryptosslCipher::ctx [private] |
Referenced by DecOutLength(), EncDec(), EncOutLength(), Finalize(), XrdCryptosslCipher(), and ~XrdCryptosslCipher().
bool XrdCryptosslCipher::deflength [private] |
Referenced by EncDec(), Finalize(), IsDefaultLength(), and XrdCryptosslCipher().
DH* XrdCryptosslCipher::fDH [private] |
Referenced by AsBucket(), Cleanup(), Finalize(), Publen(), Public(), and XrdCryptosslCipher().
char* XrdCryptosslCipher::fIV [private] |
Referenced by AsBucket(), EncDec(), GenerateIV(), IV(), RefreshIV(), SetIV(), XrdCryptosslCipher(), and ~XrdCryptosslCipher().
int XrdCryptosslCipher::lIV [private] |
Referenced by AsBucket(), GenerateIV(), IV(), RefreshIV(), SetIV(), and XrdCryptosslCipher().
bool XrdCryptosslCipher::valid [private] |
Referenced by AsBucket(), Finalize(), IsValid(), XrdCryptosslCipher(), and ~XrdCryptosslCipher().