T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
CRYPTING functions

Functions

 tpco_calcHMAC
 This function calculates an HMAC key from the input data. More...
 
 tpco_decrypt
 This function decrypts strings (see tpco_encrypt). More...
 
 tpco_encrypt
 This function encrypts strings. More...
 

Detailed Description

Function Documentation

◆ tpco_calcHMAC()

tpco_calcHMAC

This function calculates an HMAC key from the input data.

Parameters
digthe digests (sha1, md5, sha)
keymodeSTRING or BIN (if BIN the key must be encoded in HEX16)
keythe key
datamodeSTRING or BIN (if BIN the data must be encoded in HEX16)
datathe data
outputmodeHEX16 or B64 - the result is encoded as HEX16 or BASE64
Returns
the HMAC key
1 puts [tpco_calcHMAC SHA1 STRING MyKey STRING "Hello World" HEX16]
2 
3 output:
4 9e77105ab3e35a7224fae3c8f84028efca5afb1a

Referenced by TPSAP::performSapCall().

◆ tpco_decrypt()

tpco_decrypt

This function decrypts strings (see tpco_encrypt).

Very simple symmetric encryption algorithm (32Bit Random).

Parameters
keythe key string (32Bit - 4 chars)
stringthe crypted string
Returns
The clear text string.
1 puts [tpco_decrypt MyKe 9afd3e82d56cf11f78de2b]
2 
3 output:
4 hello world

Referenced by ITK::connect2TcDB(), and T4X::SOA::getConnectionParameters().

◆ tpco_encrypt()

tpco_encrypt

This function encrypts strings.

Very simple symmetric encryption algorithm (32Bit Random).

Parameters
keythe key string (32Bit - 4 chars)
stringthe input string
Returns
The encoded string in HEX16 coding.
1 puts [tpco_encrypt MyKe "hello world"]
2 
3 output:
4 9afd3e82d56cf11f78de2b

Referenced by T4S::CONNECTION2SAP::setConnectionInfoPlain2(), ITK::setConnectionParameters(), ITK::MULTI::CONNECT::setConnectParameters4Batch(), and ITK::MULTI::CONNECT::setConnectParameters4WF().