KB Article #182879

How Transfer ID (PI_13) is generated and calculate on ST

Problem

In some rare cases, when SecureTrasnport pushes a file via PeSIT to CFT, the Transfer ID (PI_13) may already be used. This could cause the transfer to fail with "code=204:204-File already exists" message.

Details

When files are pushed over PeSIT the Transfer ID (PI_13) is generated and calculated on the SecureTransport side.
The Transfer ID is based on hashing of the randomly generated SessionID, however, in some very rare situations two different Session IDs may produce the same hash, which is known as "hashcode collision".

For example, we could have two different SessionIDs as:
sId1 = 57534867657659634c53513470622b5430734c303350694d6e314a52753272585832744e57506173626f453d
sId2 = 323362717061507a6a556857384948544457644a76716b443241506c2b6a463878694e4e36474b6d5a48513d

Where the result from (Math.abs(sId1).hashCode()) & 0xFFFFFF) and (Math.abs(sId2).hashCode()) & 0xFFFFFF) is the same Transfer ID: 11791193

Transferring the file again is to generate a new SessionID/TransferID, thus the error will no longer be present.