UCommon
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
ucommon::Cipher::Key Class Reference

Cipher key formed by hash algorithm. More...

#include <secure.h>

Public Member Functions

void assign (const char *key, size_t size=0)
void clear (void)
size_t iosize (void)
 Key (const char *cipher, const char *digest, const char *text, size_t size=0, const unsigned char *salt=NULL, unsigned rounds=1)
 Key (const char *cipher, const char *digest)
 operator bool ()
bool operator! ()
Keyoperator= (const char *pass)
size_t size (void)

Static Public Member Functions

static void options (const unsigned char *salt=NULL, unsigned rounds=1)

Protected Member Functions

void assign (const char *key, size_t size, const unsigned char *salt, unsigned rounds)
 Key (const char *cipher)
void set (const char *cipher)
void set (const char *cipher, const char *digest)

Protected Attributes

union {
   int   algoid
   const void *   algotype
}; 
union {
   int   hashid
   const void *   hashtype
}; 
size_t blksize
unsigned char ivbuf [512/8]
unsigned char keybuf [512/8]
size_t keysize
int modeid

Friends

class Cipher

Detailed Description

Cipher key formed by hash algorithm.

This can generate both a key and iv table based on the algorithms used and required. Normally it is used from a pass-phrase, though any block of data may be supplied.

Author:
David Sugar <dyfet@gnutelephony.org>

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