Libraries
ARC4 Source Code
 previous   up   next 

Types
arc4State
cipherState implementation type describing the state of an ARC4 cipher.

arc4State

const type: arc4State

cipherState implementation type describing the state of an ARC4 cipher. The data is encrypted / decrypted with the ARC4 (Alleged RC4) stream cipher.


Function Summary
integer
blockSize (RC4)
Block size used by the ARC4 (Alleged RC4) stream cipher.
arc4State
setArc4Key (in string: arc4Key)
Set the key for the ARC4 (Alleged RC4) stream cipher.
cipherState
setCipherKey (RC4, in string: cipherKey, in string: initializationVector)
Set key and initialization vector for the ARC4 (Alleged RC4) stream cipher.
string
encode (inout arc4State: state, in string: plaintext)
Encode a string with the ARC4 (Alleged RC4) stream cipher.
string
decode (inout arc4State: state, in string: encoded)
Decode a string with the ARC4 (Alleged RC4) stream cipher.

Function Detail

blockSize

const func integer: blockSize (RC4)

Block size used by the ARC4 (Alleged RC4) stream cipher.

Returns:
the block size used by the ARC4 cipher.

setArc4Key

const func arc4State: setArc4Key (in string: arc4Key)

Set the key for the ARC4 (Alleged RC4) stream cipher.

Parameters:
arc4Key - The key to be used for RC4.
Returns:
the RC4 (ARC4) cipher state.

setCipherKey

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

Set key and initialization vector for the ARC4 (Alleged RC4) stream cipher.

Parameters:
cipherKey - The key to be used for RC4.
initializationVector - Unused for RC4.
Returns:
the initial cipherState of a RC4 (ARC4) cipher.

encode

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

Encode a string with the ARC4 (Alleged RC4) stream cipher.

Returns:
the encoded string.

decode

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

Decode a string with the ARC4 (Alleged RC4) stream cipher.

Returns:
the decoded string.


 previous   up   next