ZNC  trunk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
CBlowfish Class Reference

does Blowfish w/64 bit feedback, no padding More...

#include <Utils.h>

Public Member Functions

 CBlowfish (const CString &sPassword, int iEncrypt, const CString &sIvec="")
 
 ~CBlowfish ()
 
void Crypt (unsigned char *input, unsigned char *output, u_int ibytes)
 output must be the same size as input More...
 
unsigned char * Crypt (unsigned char *input, u_int ibytes)
 must free result More...
 
CString Crypt (const CString &sData)
 

Static Public Member Functions

static unsigned char * MD5 (const unsigned char *input, u_int ilen)
 output must be freed More...
 
static CString MD5 (const CString &sInput, bool bHexEncode=false)
 returns an md5 of the CString (not hex encoded) More...
 

Detailed Description

does Blowfish w/64 bit feedback, no padding

Constructor & Destructor Documentation

CBlowfish::CBlowfish ( const CString sPassword,
int  iEncrypt,
const CString sIvec = "" 
)
Parameters
sPasswordkey to encrypt with
iEncryptencrypt method (BF_DECRYPT or BF_ENCRYPT)
sIvecwhat to set the ivector to start with, default sets it all 0's
CBlowfish::~CBlowfish ( )

Member Function Documentation

void CBlowfish::Crypt ( unsigned char *  input,
unsigned char *  output,
u_int  ibytes 
)

output must be the same size as input

unsigned char* CBlowfish::Crypt ( unsigned char *  input,
u_int  ibytes 
)

must free result

CString CBlowfish::Crypt ( const CString sData)
static unsigned char* CBlowfish::MD5 ( const unsigned char *  input,
u_int  ilen 
)
static

output must be freed

static CString CBlowfish::MD5 ( const CString sInput,
bool  bHexEncode = false 
)
static

returns an md5 of the CString (not hex encoded)


The documentation for this class was generated from the following file: