Translate Data (QC3TRNDT, Qc3TranslateData) API


  Required Parameter Group:


  Service Program Name: QC3DTATR

  Default Public Authority: *USE

  Threadsafe: Yes

The Translate Data (OPM, QC3TRNDT; ILE, Qc3TranslateData) API translates data from encryption under one key to encryption under another key.


Authorities and Locks

Required API authority
*USE

Required device description authority
*USE


Required Parameter Group

Data to translate
INPUT; CHAR(*)

The data to be decrypted and encrypted again.

Length of data to translate
INPUT; BINARY(4)

The length of data in the data to translate parameter.
If the decrypt mode of operation is CFB 1-bit, the length must be specified in bits.

Decrypt algorithm context token
INPUT; CHAR(8)

The token for the algorithm context to use for decrypting the data.
The algorithm context is created by using the Create Algorithm Context (OPM, QC3CRTAX; ILE, Qc3CreateAlgorithmContext) API.
On a translate operation, the system always performs final processing (e.g. padding) and resets the algorithm context to its initial state. The algorithm context can then be used to begin a new cryptographic operation (encrypt, decrypt, etc.).

Decrypt key context token
INPUT; CHAR(8)

The token for the key context to use for decrypting the data.
The key context is created by using the Create Key Context (OPM, QC3CRTKX; ILE, Qc3CreateKeyContext) API.

Encrypt algorithm context token
INPUT; CHAR(8)

The token for the algorithm context to use for encrypting the data.
The algorithm context is created by using the Create Algorithm Context (OPM, QC3CRTAX; ILE, Qc3CreateAlgorithmContext) API.

Encrypt key context token
INPUT; CHAR(8)

The token for the key context to use for encrypting the data.
The key context is created by using the Create Key Context (OPM, QC3CRTKX; ILE, Qc3CreateKeyContext) API.

Cryptographic service provider
INPUT; CHAR(1)

The cryptographic service provider (CSP) that will perform the translate operation.

Cryptographic device name
INPUT; CHAR(10)

The name of a cryptographic device description.
This parameter is valid when the cryptographic service provider parameter specifies 2 (hardware CSP). Otherwise, this parameter must be blanks or the pointer to this paramter set to NULL.

Translated data
OUTPUT; CHAR(*)

The area to store the translated data.

Length of area provided for translated data
INPUT; BINARY(4)

The length of the translated data parameter.
To ensure sufficient space, specify an area at least as large as the length of data to translate. Be sure to add any space necessary for padding.
If the encrypt mode of operation is CFB 1-bit, this length must be specified in bits.

Length of translated data returned
OUTPUT; BINARY(4)

The length of the translated data returned in the translated data parameter.
If the length of area provided for the translated data is too small, an error will be generated and no data will be returned in the translated data parameter.
If the encrypt mode of operation is CFB 1-bit, the length will be returned in bits.

Error code
I/O; CHAR(*)

The structure in which to return error information.
For the format of the structure, see Error code parameter.


Error Messages




API introduced: V5R3

[ Back to top | Cryptographic Services APIs | APIs by category ]