Libraries
AES Source Code
 previous   up   next 

Types
aesState
cipherState implementation type describing the state of an AES cipher.

aesState

const type: aesState

cipherState implementation type describing the state of an AES cipher. The data is encrypted / decrypted with the AES (Advanced encryption standard) block cipher.


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

Function Detail

blockSize

const func integer: blockSize (AES)

Block size used by the AES (Advanced Encryption Standard) block cipher.

Returns:
the block size used by the AES cipher.

setAesKey

const func aesState: setAesKey (in string: aesKey, in string: initializationVector)

Set key and initialization vector for the AES (Advanced Encryption Standard) block cipher.

Parameters:
aesKey - The key to be used for AES.
initializationVector - The initialisation vector (IV) for AES.
Returns:
the AES (Advanced Encryption Standard) cipher state.

setCipherKey

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

Set key and initialization vector for the AES (Advanced Encryption Standard) block cipher.

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

encode

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

Encode a string with the AES (Advanced Encryption Standard) block cipher.

Returns:
the encoded string.

decode

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

Decode a string with the AES (Advanced Encryption Standard) block cipher.

Returns:
the decoded string.


 previous   up   next