SetInputStream Method

Sets the stream whose data should be processed.

Syntax

ANSI (Cross Platform)
int SetInputStream(CloudKeysStream* sInputStream);

Unicode (Windows)
INT SetInputStream(CloudKeysStream* sInputStream);
#define MID_GOOGLEKMS_SETINPUTSTREAM 22

CLOUDKEYS_EXTERNAL int CLOUDKEYS_CALL CloudKeys_GoogleKMS_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

Remarks

This method sets the stream whose data should be processed in a cryptographic operation.

Passing a non-null value for InputStream will cause the InputFile property to be cleared. Similarly, setting InputFile to a non-empty value will discard any stream set using this method.

Input Sources & Output Destinations

The class automatically determines the source and destination of the input and output based on which properties are set.

The order in which the input properties are checked is as follows:

  1. An input stream supplied via the SetInputStream method
  2. The InputFile property
  3. The InputData property

The first valid input source found is used. The order in which the output properties are considered is as follows:

  1. An output stream supplied via the SetOutputStream method
  2. The OutputFile property
  3. The OutputData property

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 C++ Edition - Version 20.0 [Build 8157]