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, const unsigned char *salt, unsigned rounds)
void assign (const char *key, size_t size=0)
String b64 (void)
void b64 (const char *string)
void clear (void)
size_t get (uint8_t *key, uint8_t *ivout=((void *) 0))
size_t iosize (void) const
 Key (const char *cipher, const char *digest, const char *text, size_t size=0, const unsigned char *salt=((void *) 0), unsigned rounds=1)
 Key (const char *cipher, const uint8_t *iv, size_t ivsize)
 Key (const char *cipher, const char *digest)
 operator bool () const
bool operator! () const
Keyoperator= (const char *pass)
void set (const unsigned char *key, size_t size)
void set (const char *cipher, const char *digest)
void set (const char *cipher, const uint8_t *iv, size_t ivsize)
size_t size (void) const

Static Public Member Functions

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

Protected Member Functions

 Key (const char *ciper)
void set (const char *cipher)

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>
Examples:
cipher.cpp.

Definition at line 276 of file secure.h.


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