Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Secure Communication Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWSecureSocketPackageInit

Module:  Secure Communication Module   Package:  Secure Sockets


Does not inherit

Local Index

Members

Header File

#include <rw/secsock/RWSecureSocketPackageInit.h>

Description

RWSecureSocketPackageInit handles the initialization and cleanup of the underlying cryptographic library. Applications must maintain an active instance of this class during all calls to the Secure Sockets package. The easiest way to do this is to create an instance of RWSecureSocketPackageInit at the beginning of main().


NOTE -- RWSecureSocketPackageInit is not multithread-safe. Multiple threads should not need to access this class. If any thread initializes the package, the initialization is valid across threads.

If you are creating a global instance of RWSecureSocketPackageInit, you must take steps to be sure that the constructor of the global RWSecureSocketPackageInit is called before any other global or static objects that use functions in the Secure Sockets package.


NOTE -- If an instance of RWSecureSocketPackageInit is not in scope when the constructor for class RWSecureSocketContext is called, the Secure Sockets package throws RWSecureSocketPackageNotInitalizedError.

Enums

enum ErrorStringsFlag { errorStringsOff, errorStringsOn };
enum SeedCheck { enableSeedCheck, disableSeedCheck };
enum WindowsSeedScreen { seedFromScreen };

Macros

RW_SECSOCK_RNG_NEEDS_SEEDING
RW_SECSOCK_SEEDRNGFROMSCREEN 

Public Constructors

RWSecureSocketPackageInit(ErrorStringsFlag errFlag =
             errorStringsOn, SeedCheck s = enableSeedCheck);
RWSecureSocketPackageInit(const RWCString& randFilePath,
                 int nBytes = -1, ErrorStringsFlag errFlag 
                 = errorStringsOn);
RWSecureSocketPackageInit( WindowsSeedScreen s,
                  ErrorStringsFlag errFlag = errorStringsOn );

Destructor

~RWSecureSocketPackageInit();

Public Member Functions


NOTE -- The following random number generator seeding functions should be called before an RWSecureSocketContext object is constructed. These functions are generally only necessary if a non-seeding constructor is used to construct the RWSecureSocketPackageInit object, and you wish to seed the RNG in main() or elsewhere.
static void 
seedRNGFromFile(const RWCString& randFile, int nBytes = -1);
static void 
seedRNGFromMemory(const unsigned char* m, size_t nBytes);
static void 
seedRNGFromScreen();


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.