Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

libdms v.4


This is portable UNIX C++ framework


Dmitry Samersoffdms@wplus.netMost of bugs
Svetlana Volokitinasvolokitina@assist.ruSQL related code


        libdms v.4 

Copyright (C) Dmitry Samersoff 1997-2005

Contact information:


Libdms is convenience library for variety of UNIX system functions.


Since 1997 I placed all common routines written by me in a single 
place for future reuse to make my everyday work easy. 
It become libdms v1. 

Some times later I rewrite all pure C functions to C++ classes 
and release libdms v2. 

The main point of libdms v3 is autoconf based build system and 
exception-based error handling. The same time guys using libdms 
ask me to place it to more convenient place 
and I move development to SourceForge 
(many thanks to SourceForge team).

Current, fourth version of libdms contains significant improvement 
since version three.
First at all - face restyling: all classes renamed to keep 
the same naming convention and to avoid possible collision 
(eg class MyException become dsSmartException). 
Most of obsoleted part of code are removed. On-line documentation improved 
and moved from doc++ to doxygen (or CPlusPlusDoc).
A number of new classes like dsOCI (Oracle oci8 interface) dsHttpd 
(base class for custom http daemons) 
or dsURL( basic url class with open SSL support) added.  
Betta-quality XML DOM parser moved into main library tree. 
Added my own implementation for a number of encryption algorithms
- DES,AES,Blowfish,RC4,RC6 (Crypto package, see READMY.crypto)
Build system moved out from autoconf to hand-made configure script 
because autoconf seems to be very unconvenient for C++. 
 Version 4.25 was ported to Win32/MSVC6 and Win32/MinGW. See README.win32

OS Compatibility:

Unfortunately, I have no access to DEC OSF1, so DEC support could be broken 
(I try to keep in mind known DEC speciality but it's not tested).   
Also I know at least one succesfull port of libdms4 to SGI irix/gcc.
I remove any mentions of SCO UnixWare and don't plan to support 
it in the future. 
Library compiles and well tested on Linux x.86, FreeBSD 3,4. 
SPARC Solaris 8/gcc


1. Untar source to any convenient place. e.g /usr/local/libdms4
2. set LIBDMS4 environment variable. e.g export LIBDMS4=/usr/local/libdms4
   or setenv LIBDMS4 /usr/local/libdms4
3. cd $(LIBDMS4)
4. ./   
   Note: this is hand-written but not GNU autoconf configure, 
   so don't look for
5. make
   Note: This library required GNU make to build 


This library doesn't offer any install procedure. If you plan to use shared version
of libdms4 you should add directory ${LIBDMS4}/lib to LD_LIBRARY_PATH or /etc/ 
or link to any common library palce e.g to /usr/local/lib

Libdms4 configuration script checks for all necessary system headers and libarary and
creates GNU make include file containing all options necessary to build 
project. It also define CC, CXX and OS variables to make sure both libdms4 and your 
project use the same compiler and OS-depended options.
Thus tipical project makefile looks like:

# $Id: README,v 1.6 2005/05/16 14:26:05 dsamersoff Exp $

include ${LIBDMS4}/


INCLUDE=-I../iso8583-v2/include $(EXTRA_INCLUDE)


CXXFLAGS+= -Wall -Wno-unused  -Wno-deprecated



You can use doxygen ( to generate
documentation by you self. 

Internally I use CPlusPlusDoc
with some small patches allows it to be runned from makefile.

There is also on-line version on, 
but it's significantly older than sources 

Unfortunately, It's hard task to keep documentation up-to-date,
so it's better to look directly through header files and examples

Crypto package testsute and usage example located in examples/CRYPTO


Here is note to some of libdms4 futures and parts:

	 Version 4.27 has dsTranslation class, designed to help creation
	 of multilanguage program. 
	 Version 4.29 contains transtool to extract untranslated messages from source
	 code see examples/transtool
Crypto package:
 	see README.crypto


# $Id: README.crypto,v 1.2 2005/05/16 14:26:05 dsamersoff Exp $

libdms4 crypto part readme (draft)

		Since version 4.43 libdms4 included my own
		implementations of two most important crypto hash 
		algorithms: MD5 and SHA1 and four block ciphers: 
		DES,AES(Rijndael),RC6,Blowfish and also RC4 stream 

	Why other one:
		The main goal of my library is to provide SIMPLE 
		and CONVENIENT way to add cryptography to a project. 

		I don't intend to repeat work of Eric Young 
		or Wei Dai  and implemen every known crypto hashes 
		and ciphers, instead I try to create clean unified 
		interface and implement only well targeted ciphers
		and also keep implementation code as readable 
		as possible.

	Test suite:
		Crypto package integrity test and usage exmaple 
		located in examples/CRYPTO
		run make in this directory and then invoke
		to be shure all encryption routines is correct

	Usage guidelines:
		1. MD5 has four rounds, SHA1 five one, so MD5 faster 
		but less secure. Most of cipher use 128 bits key, so
		it's convenient to use MD5 of user password 
		as an encryption key.

		2. RC4 is fast, compact but not very secure stream cipher,
		ideal to transfer sensitive data, but not to store 
		them.  Unique IVEC have to be provided for every messages, 
		because it's trivial to compromise key if you have two 
		different message encrypted with the same key and IVEC.
		(The same applicable to OFB mode of block cipher)

		3. ECB mode in less secure than CBC one and implemented mostly
		for compatibility. Both require aligned data. 
		OFB mode is less secure than CBC but allow you to deal with 
		arbitrary length data and perform for example in-place 

		4. Wich cipher:
		*DES (3DES)* is too old very very slow cipher. 
		*AES* is fastest of all included, one but require realy lots 
		of memory (about 10k for tables). You can comment-out
		#define dsCypher_AES_OPTIMIZE_SPEED in dsAES.h and compile
		a version that require less memory but slow. 
		DES and AES are standards, and sometines you have to use one of them.
		*RC6* has good performance and use definitly no memory but 
		there are compatibilty issues. May be because 
		it not included into openssl package yet.
		*Blowfish* is old, well known cipher with good balance of speed, 
		memory and security.  Bruce Schneier provide excelent set of 
		documentations and reference sources on his site. 

		I don't perform mutch compatibility test, but I tried to follow PKCS.
		My RC6 implementation is incompatible with Wei Dai's (licrypto++) one.
		My library of course is endian independent and is self-compatible.


$Id: HISTORY,v 1.38 2005/03/29 16:30:48 dsamersoff Exp $
4.43  All classes related to cryptography moved to it's own subdirectory
      crypto code is restructured and cleaned up
4.42  Added implementation of SHA1 and set of symmetric cyphers: AES,DES,RC6
4.41  Added RC4 implementation 
4.40  removed thir-party des implementation
	  Alladin's implementation of MD5 replaced by my own
	  removed inclomplete security related routines 
4.39  Added dsBlowfish implementation of blowfish encription 
4.38  dsBCD cleanup, added more logic to interface
4.37  Removed XpNet support
4.36  Added dsModem class
4.35  dsDaemon cleanup
4.34  Null support in dsOCI,
4.33  Rewritten dsCGI (alpha, broke compatibility)
      cleanup and debug of UNIX part of dsSerial 
4.32  Added dsSerail tty class working both under *NIX/Win32 
      database classes dsOCI and dsCT ported to win32
      a number of bugs in dsGetopt, dsMime fixed
4.31  Added dsGetopt more to process long agrguments 
      dsGetopt bugfix
4.30  Added limited expat-like parser to dsdom 
4.29  Improved translation module, 
      added examples/transtool - translation helper
4.28  Rewrite the oldest class of this library dsMmap 
      created  MSVC/win32 port of dsMmap
      added dsMmapStream to access dsMmap by iostream interface (ALPHA quality)
4.27  Added dsTranslation(based on dsApprc)
      yet another rewriting of dsApprc to support translation-related 
      futures like spaced and multiline keys
      removed unnecessary README's (all information moved to main README)
4.26  Reusable part extracted from to
      cleanup of dsLoadRcFile
      translation macros name changed from _X to _dX
4.25  Working MSVC6 (static) port
      added .include "fname" and _X(key) macro to dsApprc 
4.24  First (preleminary) MSVC6 port Warning! Can be dangerouse 
4.23  Added dsSOAP.h - header file with a number of SOAP related
      convenience functions
4.23  Added ds_strdup
4.22  A number of significant bugs fixed (dsLog, dsSocket)
      added conveninecy function to dsApprc and dsSocket 
      added example of tipical libdms4 based project
4.21  Added support for comma separated <to> list to  dsSMTP
4.20  Added posbbility to specify PID_PATH to dsDaemon
4.19  Added dsGetopt - getopt for win32 port 
      Added dsBCD - class to convert dec to BCD and back
4.18  Mingw port
4.17  Cleanup and improvement of dsApprc variable handling
      it now can handle $(var), ${var}, $var and more than one var
      in val string. Also handled \ as escape
4.16  All mentions of strstream changed  to dsStrstream
      Removed non working dsLog::udpTee
	  Changed dsSmartException: _tag & _message now dsStrstream* instead of char*
4.15  Added dsStrstream - reimplementation of std:strstream
4.14  Rewriten dsSMTP 
4.13  Rewriten dsSocket to speedup and more correct reading/writing
      Rewriten dsHttpd to be more robust
      Fixed bug in dsHashTable 
4.12  Significant bugfix (frogotten destructor in dsOCI)
      Implemented nanosleep suspend fro dsDaemon 
4.11  Started Sybase interface - dsCT
      many thanks to Svetlana 
4.10  Public betta
4.09  Added template for oracle SP wrapper
4.08  Rewritten fcntl() locking routines
4.07  libDOM is in seems-to-be working state, not all DOM2 futures supported
      but I start using it in real project
      fixed number of bugs in URL, Hash
      rewritten logging routene
      added sform/svform functions to support printf like output
      to iostream
4.06  Started libDOM 
      libXdms moved to directory offroad
      added directory offroad
4.05  Added primitive SOAP support
      fixed a number of bugs in Url class
      added to simplify projects Makefiles
4.04  Added primitive support of openssl
      fixed a number of configure problems 
      started todo list 
4.03  Added support for http auth to url
      added base64 encode function to mime module
4.02  Added support for url_post
4.01  Added support for Oracle OCI8

3.03  added support of gdbm to runNDBM 
3.02  my popen routine did not support parameters enclosed to quotes
3.01  FreeBSD 4.0 properly handled
      fixed some bugs in ssplit
      fixed some bugs in cgi
3.00  Started this history

Generated on Mon May 16 18:26:57 2005 for libdms4 by doxygen1.3-rc2