Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

MQe_LocalSecure.h File Reference


Detailed Description

MQeLocalSecure API prototypes.


Functions

MQERETURN mqeLocalSecure_new (MQeExceptBlock *pErrStruct, MQeLocalSecureHndl *phLocalSecure)
 This function returns an MQeLocalSecure handle.

MQERETURN mqeLocalSecure_free (MQeLocalSecureHndl hLocalSecure, MQeExceptBlock *pErrStruct)
 frees the MQeLocalSecure handle hLocalSecure

MQERETURN mqeLocalSecure_open (MQeLocalSecureHndl hLocalSecure, MQeExceptBlock *pErrStruct, MQeStringHndl hFileDir, MQeStringHndl hFileName)
 This function opens the file using the supplied directory and name.

MQERETURN mqeLocalSecure_read (MQeLocalSecureHndl hLocalSecure, MQeExceptBlock *pErrStruct, MQEBYTE *pBuffer, MQEINT32 *pBufLength, MQeFieldsAttrHndl hAttribute, MQeStringHndl hCipherKey)
 This function reads the data from the file and decrypts it.

MQERETURN mqeLocalSecure_write (MQeLocalSecureHndl hLocalSecure, MQeExceptBlock *pErrStruct, MQEBYTE *pData, MQEINT32 length, MQeFieldsAttrHndl hAttribute, MQeStringHndl hCipherKey)
 This function writes the encrypted data to the file.


Function Documentation

MQERETURN mqeLocalSecure_new MQeExceptBlock   pErrStruct,
MQeLocalSecureHndl *    phLocalSecure
 

This function returns an MQeLocalSecure handle.

Parameters:
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
phLocalSecure  [in/out] Pointer to handle for output
Precondition:
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
phLocalSecure must not be NULL.
Returns :
(*phLocalSecure).
Warning:
Users are expected to use mqeLocalSecure_free() to free the structure returned by this call when it is no longer needed. This enables reuse of system resources and can help to avoid system problems caused by shortage of resources.
Return values:
MQERETURN_OK 
  • Completed Successfully
MQERETURN_LOCALSECURE_NEW_FAIL 
  • MQEREASON_LOCALSECURE_ALLOC_FAIL unable to allocate enough memory
other 
  • common error codes caused by invalid supplied parameters

MQERETURN mqeLocalSecure_free MQeLocalSecureHndl    hLocalSecure,
MQeExceptBlock   pErrStruct
 

frees the MQeLocalSecure handle hLocalSecure

Parameters:
hLocalSecure  [in] Handle for the MQeLocalSecure to be freed
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
Precondition:
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
MQERETURN_OK 
  • Completed Successfully
MQERETURN_SESSION_NOT_INITIALIZED 
  • MQEREASON_NA session not initialized
MQERETURN_LOCALSECURE_FREE_FAIL 
  • MQEREASON_LOCALSECURE_FREE_FAIL unable to free some/all of the memory
other 
  • common error codes caused by invalid supplied parameters

MQERETURN mqeLocalSecure_open MQeLocalSecureHndl    hLocalSecure,
MQeExceptBlock   pErrStruct,
MQeStringHndl    hFileDir,
MQeStringHndl    hFileName
 

This function opens the file using the supplied directory and name.

Parameters:
hLocalSecure  [in] Handle for the MQeLocalSecure to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
hFileDir  [in] Handle for the directory to the file.
hFileName  [in] Handle for the file name
Precondition:
hLocalSecure must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
MQERETURN_OK 
  • Completed Successfully
MQERETURN_SESSION_NOT_INITIALIZED 
  • MQEREASON_NA session not initialized
MQERETURN_LOCALSECURE_OPEN_FAIL 
  • MQEREASON_LOCALSECURE_ALLOC_FAIL unable to allocate memory
other 
  • common error codes caused by invalid supplied parameters

MQERETURN mqeLocalSecure_read MQeLocalSecureHndl    hLocalSecure,
MQeExceptBlock   pErrStruct,
MQEBYTE *    pBuffer,
MQEINT32 *    pBufLength,
MQeFieldsAttrHndl    hAttribute,
MQeStringHndl    hCipherKey
 

This function reads the data from the file and decrypts it.

Parameters:
hLocalSecure  [in] Handle for the MQeLocalSecure to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
pBuffer  [in/out] Pointer to output buffer
pBufLength  [in/out] Pointer to buffer ((*pBuffer) ) length variable
hAttribute  [in] Handle for the MQeAttribute
hCipherKey  [in] Ignored parameter (hAttribute's key used instead)
Precondition:
hLocalSecure must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Returns :
pBuffer and pBufLength:
 * ---------------------- ---------------- -------------------------------- -------------------------
 * initial (*pBufLength)  initial pBuffer  returned (*pBufLength)           returned pBuffer
 * ---------------------- ---------------- -------------------------------- -------------------------
 * 0                      any              buffer size (in bytes) required  not defined
 * any                    NULL             ditto                            ditto
 * != 0                   != NULL          buffer space used (in bytes)     points to the result
 * 
Return values:
MQERETURN_OK 
  • Completed Successfully
MQERETURN_SESSION_NOT_INITIALIZED 
  • MQEREASON_NA session not initialized
MQERETURN_S_LOCALSECURE_READ_FAIL 
  • MQEREASON_LOCALSECURE_NO_CRYPTOR no cryptor attached to the attribute parameter
MQERETURN_S_LOCALSECURE_READ_FAIL 
  • MQEREASON_LOCALSECURE_NOT_OPEN hLocalSecure not yet opened
MQERETURN_S_LOCALSECURE_READ_FAIL 
  • other reason codes from internal errors
MQERETURN_S_LOCALSECURE_CHECK_CRYPTOR_FAIL 
  • MQEREASON_LOCALSECURE_INVALID_CRYPTOR not one of the supported cryptors
MQERETURN_S_LOCALSECURE_CHECK_CRYPTOR_FAIL 
  • other reason codes from internal errors
MQERETURN_S_LOCALSECURE_SET_ATTR_FAIL 
  • all internal errors
other 
  • common error codes caused by invalid supplied parameters

MQERETURN mqeLocalSecure_write MQeLocalSecureHndl    hLocalSecure,
MQeExceptBlock   pErrStruct,
MQEBYTE *    pData,
MQEINT32    length,
MQeFieldsAttrHndl    hAttribute,
MQeStringHndl    hCipherKey
 

This function writes the encrypted data to the file.

Parameters:
hLocalSecure  [in] Handle for the MQeLocalSecure to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
pData  [in] Pointer to the data as a byte array
length  [in] Length of data to be written to file
hAttribute  [in] Handle for the MQeAttribute
hCipherKey  [in] Handle for the cipher key to be used by the MQeAttribute
Precondition:
hLocalSecure must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
MQERETURN_OK 
  • Completed Successfully
MQERETURN_SESSION_NOT_INITIALIZED 
  • MQEREASON_NA session not initialized
MQERETURN_S_LOCALSECURE_WRITE_FAIL 
  • MQEREASON_LOCALSECURE_NO_CRYPTOR no cryptor attached to the attribute parameter
MQERETURN_S_LOCALSECURE_WRITE_FAIL 
  • MQEREASON_LOCALSECURE_NOT_OPEN hLocalSecure not yet opened
MQERETURN_S_LOCALSECURE_WRITE_FAIL 
  • other reason codes from internal errors
MQERETURN_S_LOCALSECURE_CHECK_CRYPTOR_FAIL 
  • MQEREASON_LOCALSECURE_INVALID_CRYPTOR not one of the supported cryptors
MQERETURN_S_LOCALSECURE_CHECK_CRYPTOR_FAIL 
  • other reason codes from internal errors
MQERETURN_S_LOCALSECURE_SET_ATTR_FAIL 
  • all internal errors
other 
  • common error codes caused by invalid supplied parameters


Generated Thu Aug 11 23:27:10 2005 for Websphere MQ Everyplace for Multiplatforms C Programming Reference