Libraries
DES Source Code
 previous   up   next 

Types
desState
cipherState implementation type describing the state of a DES cipher.

desState

const type: desState

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


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

Function Detail

blockSize

const func integer: blockSize (DES)

Block size used by the DES (Data Encryption Standard) block cipher.

Returns:
the block size used by the DES cipher.

setDesKey

const func desState: setDesKey (in string: desKey, in string: initializationVector)

Set key and initialization vector for the DES (Data Encryption Standard) block cipher.

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

setCipherKey

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

Set key and initialization vector for the DES (Data Encryption Standard) block cipher.

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

encode

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

Encode a string with the DES (Data Encryption Standard) block cipher.

Returns:
the encoded string.

decode

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

Decode a string with the DES (Data Encryption Standard) block cipher.

Returns:
the decoded string.


 previous   up   next