ZNC  trunk
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 ()
 
 CBlowfish (const CBlowfish &)=default
 
CBlowfishoperator= (const CBlowfish &)=default
 
void Crypt (unsigned char *input, unsigned char *output, unsigned int ibytes)
 output must be the same size as input More...
 
unsigned char * Crypt (unsigned char *input, unsigned int ibytes)
 must free result More...
 
CString Crypt (const CString &sData)
 

Static Public Member Functions

static unsigned char * MD5 (const unsigned char *input, unsigned 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() [1/2]

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::~CBlowfish ( )

◆ CBlowfish() [2/2]

CBlowfish::CBlowfish ( const CBlowfish )
default

Member Function Documentation

◆ Crypt() [1/3]

CString CBlowfish::Crypt ( const CString sData)

◆ Crypt() [2/3]

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

output must be the same size as input

◆ Crypt() [3/3]

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

must free result

◆ MD5() [1/2]

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

returns an md5 of the CString (not hex encoded)

◆ MD5() [2/2]

static unsigned char* CBlowfish::MD5 ( const unsigned char *  input,
unsigned int  ilen 
)
static

output must be freed

◆ operator=()

CBlowfish& CBlowfish::operator= ( const CBlowfish )
default

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