Libraries
Triple DES Source Code
 previous   up   next 

Types
tdesState
cipherState implementation type describing the state of a TDES cipher.

tdesState

const type: tdesState

cipherState implementation type describing the state of a TDES cipher. The data is encrypted / decrypted with the TDES (Triple DES) block cipher.


Function Summary
integer
blockSize (TDES)
Block size used by the TDES (Triple DES) block cipher.
tdesState
setTdesKey (in string: desKey, in string: initializationVector)
Set key and initialization vector for the TDES (Triple DES) block cipher.
cipherState
setCipherKey (TDES, in string: cipherKey, in string: initializationVector)
Set key and initialization vector for the TDES (Triple DES) block cipher.
string
encode (inout tdesState: state, in string: plaintext)
Encode a string with the TDES (Triple DES) block cipher.
string
decode (inout tdesState: state, in string: encoded)
Decode a string with the TDES (Triple DES) block cipher.

Function Detail

blockSize

const func integer: blockSize (TDES)

Block size used by the TDES (Triple DES) block cipher.

Returns:
the block size used by the TDES cipher.

setTdesKey

const func tdesState: setTdesKey (in string: desKey, in string: initializationVector)

Set key and initialization vector for the TDES (Triple DES) block cipher.

Parameters:
desKey - The key to be used for TDES.
initializationVector - The initialisation vector (IV) for TDES.
Returns:
the TDES (Triple DES) cipher state.

setCipherKey

const func cipherState: setCipherKey (TDES, in string: cipherKey, in string: initializationVector)

Set key and initialization vector for the TDES (Triple DES) block cipher.

Parameters:
cipherKey - The key to be used for TDES.
initializationVector - The initialisation vector (IV) for TDES.
Returns:
the initial cipherState of a TDES cipher.

encode

const func string: encode (inout tdesState: state, in string: plaintext)

Encode a string with the TDES (Triple DES) block cipher.

Returns:
the encoded string.

decode

const func string: decode (inout tdesState: state, in string: encoded)

Decode a string with the TDES (Triple DES) block cipher.

Returns:
the decoded string.


 previous   up   next